Computer implemented methods and apparatus for providing internal custom feed items

ABSTRACT

Disclosed are systems, apparatus, and methods for presenting feed items in an information feed. In various implementations, a first result object is received, where the first result object is a data structure including a result of a feed query, where the result of the feed query includes at least one feed item to be included in the information feed, and where the at least one feed item has a first presentation. In various implementations, at least one custom object associated with the at least one feed item is received, where the at least one custom object provides a second presentation of the at least one feed item. In some implementations, the at least one custom object is included with the first result object to define an intermediary data structure. In some implementations, the intermediary data structure is stored on one or more storage mediums.

PRIORITY AND RELATED APPLICATION DATA

This application claims priority to co-pending and commonly assignedU.S. Provisional Patent Application No. 61/510,267, titled “Systems andMethods for Providing Internal Custom Feed Items”, by Hanson, filed onJul. 21, 2011, and co-pending and commonly assigned U.S. ProvisionalPatent Application No. 61/507,846, titled “Systems and Methods forImplementing a Social Network Newsfeed as a Platform”, by Thaxton etal., filed on Jul. 14, 2011, which are hereby incorporated by referencein its entirety and for all purposes.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains material,which is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

TECHNICAL FIELD

The present application relates generally to providing on-demandservices in an online social network using a database system and, morespecifically, to techniques for providing an information feed in theonline social network.

BACKGROUND

“Cloud computing” services provide shared resources, software, andinformation to computers and other devices upon request. In cloudcomputing environments, software can be accessible over the Internetrather than installed locally on in-house computer systems. Cloudcomputing typically involves over-the-Internet provision of dynamicallyscalable and often virtualized resources. Technological details can beabstracted from the users, who no longer have need for expertise in, orcontrol over, the technology infrastructure “in the cloud” that supportsthem.

Database resources can be provided in a cloud computing context.However, using conventional database management techniques, it isdifficult to know about the activity of other users of a database systemin the cloud or other network. For example, the actions of a particularuser, such as a salesperson, on a database resource may be important tothe user's boss. The user can create a report about what the user hasdone and send it to the boss, but such reports may be inefficient, nottimely, and incomplete. Also, it may be difficult to identify otherusers who might benefit from the information in the report.

BRIEF DESCRIPTION OF THE DRAWINGS

The included drawings are for illustrative purposes and serve only toprovide examples of possible structures and process operations for thedisclosed inventive systems, apparatus, and methods for providing aninformation feed in a social network. These drawings in no way limit anychanges in form and detail that may be made by one skilled in the artwithout departing from the spirit and scope of the disclosedimplementations.

FIG. 1A shows a block diagram of an example of an environment 10 inwhich an on-demand database service can be used in accordance with someimplementations.

FIG. 1B shows a block diagram of an example of some implementations ofelements of FIG. 1A and various possible interconnections between theseelements.

FIG. 2A shows a system diagram illustrating an example of architecturalcomponents of an on-demand service environment 200 according to someimplementations.

FIG. 2B shows a system diagram further illustrating an example ofarchitectural components of an on-demand service environment accordingto some implementations.

FIG. 3 shows a flowchart of an example of a method 300 for trackingupdates to a record stored in a database system, performed in accordancewith some implementations.

FIG. 4 shows a block diagram of an example of components of a databasesystem configuration 400 performing a method for tracking an update to arecord according to some implementations.

FIG. 5 shows a flowchart of an example of a method 500 for trackingactions of a user of a database system, performed in accordance withsome implementations.

FIG. 6 shows a flowchart of an example of a method 600 for creating anews feed from messages created by a user about a record or anotheruser, performed in accordance with some implementations.

FIG. 7 shows an example of a group feed on a group page according tosome implementations.

FIG. 8 shows an example of a record feed containing a feed trackedupdate, post, and comments according to some implementations.

FIG. 9A shows an example of a plurality of tables that may be used intracking events and creating feeds according to some implementations.

FIG. 9B shows a flowchart of an example of a method 900 forautomatically subscribing a user to an object in a database system,performed in accordance with some implementations.

FIG. 10 shows a flowchart of an example of a method 1000 for savinginformation to feed tracking tables, performed in accordance with someimplementations.

FIG. 11 shows a flowchart of an example of a method 1100 for reading afeed item as part of generating a feed for display, performed inaccordance with some implementations.

FIG. 12 shows a flowchart of an example of a method 1200 for reading afeed item of a profile feed for display, performed in accordance withsome implementations.

FIG. 13 shows a flowchart of an example of a method 1300 of storingevent information for efficient generation of feed items to display in afeed, performed in accordance with some implementations.

FIG. 14 shows a flowchart of an example of a method 1400 for creating acustom feed for users of a database system using filtering criteria,performed in accordance with some implementations.

FIG. 15 shows a flowchart of an example of a social network feed method1500, performed in accordance with some implementations.

FIG. 16 shows a flowchart of an example of an information feedgeneration method 1600, performed in accordance with someimplementations.

FIG. 17 shows a flowchart of an example of a create new feed type method1700, performed in accordance with some implementations.

FIG. 18 shows a flowchart of an example of an information feedpresentation method 1800, performed in accordance with someimplementations.

FIG. 19 shows a flowchart of an example of a feed pagination method1900, performed in accordance with some implementations.

FIG. 20 shows a flowchart of an example of a feed customization method2000, performed in accordance with some implementations.

FIG. 21 shows a flowchart of another example of a feed customizationmethod 2100, performed in accordance with some implementations.

FIG. 22 shows a flowchart of an example of a create new feed item typemethod 2200, performed in accordance with some implementations.

FIG. 23 displays a system representation of a database system 2300 thatmay be used to generate and present an information feed.

DETAILED DESCRIPTION

Examples of systems, apparatus, and methods according to the disclosedimplementations are described in this section. These examples are beingprovided solely to add context and aid in the understanding of thedisclosed implementations. It will thus be apparent to one skilled inthe art that implementations may be practiced without some or all ofthese specific details. In other instances, certain process/methodoperations, also referred to herein as “blocks,” have not been describedin detail in order to avoid unnecessarily obscuring implementations.Other applications are possible, such that the following examples shouldnot be taken as definitive or limiting either in scope or setting.

In the following detailed description, references are made to theaccompanying drawings, which form a part of the description and in whichare shown, by way of illustration, specific implementations. Althoughthese implementations are described in sufficient detail to enable oneskilled in the art to practice the disclosed implementations, it isunderstood that these examples are not limiting, such that otherimplementations may be used and changes may be made without departingfrom their spirit and scope. For example, the blocks of methods shownand described herein are not necessarily performed in the orderindicated. It should also be understood that the methods may includemore or fewer blocks than are indicated. In some implementations, blocksdescribed herein as separate blocks may be combined. Conversely, whatmay be described herein as a single block may be implemented in multipleblocks.

Various implementations described or referenced herein are directed todifferent methods, apparatus, systems, and computer program products forproviding an information feed, also referred to herein as a feed. Insome online social networks, users can access one or more informationfeeds, which include information updates presented as feed items, forinstance, in a graphical user interface (GUI) of a display device. Theinformation updates can include various social network data from varioussources and can be stored in an on-demand database service environment.In some implementations, the disclosed methods, apparatus, systems, andcomputer program products may be configured or designed for use in amulti-tenant database environment.

In some implementations, an online social network may allow a user tofollow data objects in the form of records such as cases, accounts, oropportunities, in addition to following individual users and groups ofusers. One example of an online social network is Chatter®, provided bysalesforce.com, inc. of San Francisco, Calif. Such online socialnetworks can be implemented in various settings, includingorganizations, e.g., enterprises such as companies or businesspartnerships, academic institutions, or groups within such anorganization. For instance, Chatter® can be used by employee users in adivision of a business organization to share data, communicate, andcollaborate with each other for various purposes.

The “following” of a record stored in a database, as described ingreater detail below, allows a user to track the progress of thatrecord. Updates to the record, also referred to herein as changes to therecord, can occur and be noted on an information feed such as a recordfeed or a news feed of a user subscribed to the record. With thedisclosed implementations, such record updates are often presented as anitem or entry in the feed. Such a feed item can include a single updateor a collection of individual updates. Information updates presented asfeed items in an information feed can include updates to a record, aswell as other types of updates such as user actions and events, asdescribed herein. Examples of record updates include field changes inthe record, as well as the creation of the record itself. Examples ofother types of information updates, which may or may not be linked witha particular record depending on the specific use of the informationupdate, include various types of messages. Examples of messages includeposts such as explicit text or characters submitted by a user,multimedia data sent between or among users (for instance, included in apost), status updates such as updates to a user's status or updates tothe status of a record, uploaded files, indications of a user's personalpreferences such as “likes” and “dislikes”, and links to other data orrecords. Information updates can also be group-related, e.g., a changeto group status information for a group of which the user is one ofseveral members. A user following, e.g., subscribed to, a record iscapable of viewing record updates on the user's news feed, which canalso include the other various types of information updates describedabove. Any number of users can follow a record and thus view recordupdates in this fashion. Some records are publicly accessible, such thatany user can follow the record, while other records are private, forwhich appropriate security clearance/permissions are a prerequisite to auser following the record.

Online social networks are increasingly becoming a common way tofacilitate communication between individuals and groups of individuals,any of whom can be recognized as “users” of a social networking system.In many social networks, individuals may establish connections with oneother, sometimes referred to as “friending” one another. By establishingsuch a connection, one user may be able to see information generated byor associated with another user. For instance, a first user may be ableto see information posted by a second user to the first user's personalsocial network page. One implementation of such a personal socialnetwork page is a user's profile page, for example, in the form of a webpage representing the user's profile. For example, a post submitted bythe second user about the first user can be presented on the firstuser's profile feed, also referred to herein as the user's “wall,” whichcan be displayed on the first user's profile page.

In some implementations, an information feed in the context of a socialnetwork may be a collection of information selected from the socialnetwork for presentation in a user interface. The information presentedin the information feed may include posts to a user's wall or any othertype of information accessible within the social network. A feed itemcan include various types of data including character-based data, audiodata and/or video data. For instance, a post can include text incombination with a JPEG image or animated image. Feed items ininformation feeds such as a user's news feed may include messages, whichcan take the form of: posts comprising textual/character-based inputssuch as words, phrases, statements, questions, emotional expressions,and/or symbols; responses to posts, also referred to herein as“comments”, such as words, phrases, statements, answers, questions, andreactionary emotional expressions; indications of personal preferenceswhich can be submitted as responses to posts or comments; statusupdates; and hyperlinks. In other examples, messages can be in the formof file uploads, such as presentations, documents, multimedia files, andthe like.

In some implementations, a news feed may be specific to an individualuser, a group of users, or a data object. For instance, a group of userson a social network may publish a news feed. Members of the group andthe larger social network may view and post to the group news feed inaccordance with a permissions configuration for the news feed and thegroup.

In some implementations, when data such as posts or comments input fromone or more users are published to an information feed for a particularuser, group, object, or other construct within a social network, ane-mail notification or other type of notification may be transmitted toall users following the user, group, or object in addition to theposting of the published data as a feed item in one or more feeds, suchas a news feed or a record feed. In some social networks, the occurrenceof such a notification is limited to the first instance of a publishedinput, which may form part of a larger conversation. For instance, anotification may be transmitted for an initial post, but neither forcomments on the post nor for follow-up posts related to the initialpost. In some other implementations, notifications are transmitted forall such published inputs.

Some implementations of the disclosed systems, apparatus, and methodsare configured to provide an information feed, for instance, to one ormore users of an on-demand service provided by a database serviceprovider.

In various implementations, a platform for generating an informationfeed may be provided. The platform may include a first interface, suchas a feed data layer, that identifies and retrieves feed items toinclude in an information feed. In various implementations, the feeddata layer may include at least two separate components. A firstcomponent may handle queries of one or more database tables storing feeditems. The second component may receive parameters from a user and passthe parameters to the first component. In various implementations, theparameters may parameterize the query in order to determine which feeditems are relevant to the information feed and should be included in theinformation feed. In various implementations, the relevant feed items,or their respective feed item IDs, may be included in a result object.The separation of the feed data layer into two components may allow adatabase service provider to control and limit access to the type andnumber of database queries that may be performed on the database whileallowing the user to parameterize queries. For example, a user may beprevented from modifying the types of queries or frequency of queriesperformed by the first component. However, the user may still passparameters to the first component via the second component in order toparameterize the database queries. In various implementations, providingthis separation allows the database service provider to preventredundant and excessive user-generated queries that may burden databaseresources. Furthermore, because the queries may be written by thedatabase service provider for specific purposes, the queries may beoptimized for those purposes.

In some implementations, the platform for generating an information feedmay include a second interface, such as a feed presentation layer, thatconverts raw data included in the result object into a data object, anintermediary data structure, which may be rendered and displayed to auser. In various implementations, the raw data included in the resultobject may include data such as identifiers used to identify a feeditem. For example an identifier may be an object ID such as OID819.While the object ID may identify a relevant feed item, more informationmay be needed in order to display the feed item to a user in ameaningful way because the user would not know what OID819 means. Thus,contextual and formatting information may be identified and retrieved.Contextual information may provide additional information such as a fulltext sentence describing a change in attribute of a record, as opposedto an object ID that simply points to a feed item associated with therecord. Formatting information may provide a visual and spatialindication of how the information should be displayed in an informationfeed. Contextual and formatting information may be retrieved for eachfeed item of the result object and included with the result object togenerate the intermediary data structure. In various implementations,the intermediary data structure may include sufficient information todisplay the feed items identified by the result object in an informationfeed without additional database queries. Furthermore, the intermediarydata structure may be accessible and readable by multiple clientapplications. Thus, multiple client applications may render and displaythe intermediary data structure without each having to run its ownseparate database query.

In various implementations, a feed item handler interface may beprovided that customizes feed items to be included in an informationfeed. In some implementations, the feed item handler interface maycustomize feed items included in the result object by changing ormodifying a presentation or functionality of the feed items.Accordingly, a feed item handler interface may provide a first user withthe ability to create a new feed item type. The feed item handlerinterface may receive an input identifying a new feed item type, querydata relevant to the new feed item type, and combine the returned datawith one or more feed items during the generation of the intermediarydata structure. Once the new feed item type has been registered with thedatabase service provider, the new feed item type may be used by asecond user. Thus, the second user need not create a new feed item type,but instead may access and use the new feed item type created by thefirst user.

These and other implementations may be embodied in various types ofhardware, software, firmware, and combinations thereof. For example,some techniques disclosed herein may be implemented, at least in part,by computer-readable media that include program instructions, stateinformation, etc., for performing various services and operationsdescribed herein. Examples of program instructions include both machinecode, such as produced by a compiler, and files containing higher-levelcode that may be executed by a computing device such as a server orother data processing apparatus using an interpreter. Examples ofcomputer-readable media include, but are not limited to, magnetic mediasuch as hard disks, floppy disks, and magnetic tape; optical media suchas CD-ROM disks; magneto-optical media; and hardware devices that arespecially configured to store program instructions, such as read-onlymemory devices (“ROM”) and random access memory (“RAM”) devices. Theseand other features of the disclosed implementations will be described inmore detail below with reference to the associated drawings.

The term “multi-tenant database system” can refer to those systems inwhich various elements of hardware and software of a database system maybe shared by one or more customers. For example, a given applicationserver may simultaneously process requests for a great number ofcustomers, and a given database table may store rows for a potentiallymuch greater number of customers. The term “query plan” generally refersto one or more operations used to access information in a databasesystem.

A “user profile” or “user's profile” is generally configured to storeand maintain data about the user of the database system. The data caninclude general information, such as title, phone number, a photo, abiographical summary, and a status (e.g., text describing what the useris currently doing). As mentioned below, the data can include messagescreated by other users. Where there are multiple tenants, a user istypically associated with a particular tenant. For example, a user couldbe a salesperson of a company, which is a tenant of the database systemthat provides a database service.

The term “record” generally refers to a data entity, such as an instanceof a data object created by a user of the database service, for example,about a particular (actual or potential) business relationship orproject. The data object can have a data structure defined by thedatabase service (a standard object) or defined by a subscriber (customdata structure). For example, a record can be for a business partner orpotential business partner (e.g., a client, vendor, distributor, etc.)of the user, and can include an entire company, subsidiaries, orcontacts at the company. As another example, a record can be a projectthat the user is working on, such as an opportunity (e.g., a possiblesale) with an existing partner, or a project that the user is trying toget. In one implementation of a multi-tenant database, each record forthe tenants has a unique identifier stored in a common table. A recordhas data fields that are defined by the structure of the object (e.g.,fields of certain data types and purposes). A record can also havecustom fields defined by a user. A field can be another record orinclude links thereto, thereby providing a parent-child relationshipbetween the records.

The terms “information feed” and “feed” are used interchangeably hereinand generally refer to a combination (e.g., a list) of feed items orentries with various types of information and data. Such feed items canbe stored and maintained in one or more database tables, e.g., as rowsin the table(s), that can be accessed to retrieve relevant informationto be presented as part of a displayed feed. The term “feed item” (orfeed element) refers to an item of information, which can be presentedin the feed such as a post submitted by a user. Feed items ofinformation about a user can be presented in a user's profile feed ofthe database, while feed items of information about a record can bepresented in a record feed in the database, by way of example. A profilefeed and a record feed are examples of different information feeds. Asecond user following a first user or record can receive the feed itemsassociated with the first user and the record for display in the seconduser's news feed, which is another type of information feed. In someimplementations, the feed items from any number of followed users andrecords can be combined into a single information feed of a particularuser.

As examples, a feed item can be a message, such as a user-generated postof text data, and a feed tracked update to a record or profile, such asa change to a field of the record. A feed can be a combination ofmessages and feed tracked updates. Messages include text created by auser, and may include other data as well. Examples of messages includeposts, user status updates, and comments. Messages can be created for auser's profile or for a record. Posts can be created by various users,potentially any user, although some restrictions can be applied. As anexample, posts can be made to a wall section of a user's profile page(which can include a number of recent posts) or a section of a recordthat includes multiple posts. The posts can be organized inchronological order when displayed in a graphical user interface (GUI),for instance, on the user's profile page, as part of the user's profilefeed. In contrast to a post, a user status update changes a status of auser and can be made by that user or an administrator. Other similarsections of a user's profile can also include an “About” section. Arecord can also have a status, the update of which can be provided by anowner of the record or other users having suitable write accesspermissions to the record. The owner can be a single user, multipleusers, or a group. In one implementation, there is only one status for arecord.

In one implementation, a comment can be made on any feed item. Inanother implementation, comments are organized as a list explicitly tiedto a particular feed tracked update, post, or status update. In thisimplementation, comments may not be listed in the first layer (in ahierarchal sense) of feed items, but listed as a second layer branchingfrom a particular first layer feed item.

A “feed tracked update,” also referred to herein as a “feed update,” isone type of information update and generally refers to data representingan event. A feed tracked update can include text generated by thedatabase system in response to the event, to be provided as one or morefeed items for possible inclusion in one or more feeds. In oneimplementation, the data can initially be stored, and then the databasesystem can later use the data to create text for describing the event.Both the data and/or the text can be a feed tracked update, as usedherein. In various implementations, an event can be an update of arecord and/or can be triggered by a specific action by a user. Whichactions trigger an event can be configurable. Which events have feedtracked updates created and which feed updates are sent to which userscan also be configurable. Messages and feed updates can be stored as afield or child object of the record. For example, the feed can be storedas a child object of the record.

A “group” is generally a collection of users. In some implementations,the group may be defined as users with a same or similar attribute, orby membership. In one implementation, a “group feed” includes any feeditem about any user in a group. In another implementation, the groupfeed includes feed items that are about the group as a whole. In oneimplementation, the feed items for a group are only posts and comments.

An “entity feed” or “record feed” generally refers to a feed of feeditems about a particular record in the database, such as feed trackedupdates about changes to the record and posts made by users about therecord. An entity feed can be composed of any type of feed item. Such afeed can be displayed on a page such as a web page associated with therecord, e.g., a home page of the record. As used herein, a “profilefeed” is a feed of feed items about a particular user. In oneimplementation, the feed items for a profile feed are posts and commentsthat other users make about or send to the particular user, and statusupdates made by the particular user. Such a profile feed can bedisplayed on a page associated with the particular user. In anotherimplementation, feed items in a profile feed could include posts made bythe particular user and feed tracked updates initiated based on actionsof the particular user.

I. General Overview

Systems, apparatus, and methods are provided for implementing enterpriselevel social and business information networking. Such implementationscan provide more efficient use of a database system. For instance, auser of a database system may not easily know when important informationin the database has changed, e.g., about a project or client.Implementations can provide feed tracked updates about such changes andother events, thereby keeping users informed.

By way of example, a user can update a record (e.g., an opportunity suchas a possible sale of 1000 computers). Once the record update has beenmade, a feed tracked update about the record update can thenautomatically be sent (e.g., in a feed) to anyone subscribing to theopportunity or to the user. Thus, the user does not need to contact amanager regarding the change in the opportunity, since the feed trackedupdate about the update is sent via a feed right to the manager's feedpage (or other page).

Next, mechanisms and methods for providing systems implementingenterprise level social and business information networking will bedescribed with reference to example implementations. First, an overviewof an example database system is described, and then examples oftracking events for a record, actions of a user, and messages about auser or record are described. Various implementations about the datastructure of feeds, customizing feeds, user selection of records andusers to follow, generating feeds, and displaying feeds are alsodescribed.

II. System Overview

FIG. 1A shows a block diagram of an example of an environment 10 inwhich an on-demand database service can be used in accordance with someimplementations. Environment 10 may include user systems 12, network 14,database system 16, processor system 17, application platform 18,network interface 20, tenant data storage 22, system data storage 24,program code 26, and process space 28. In other implementations,environment 10 may not have all of these components and/or may haveother components instead of, or in addition to, those listed above.

Environment 10 is an environment in which an on-demand database serviceexists. User system 12 may be any machine or system that is used by auser to access a database system 16. For example, any of user systems 12can be a handheld computing device, a mobile phone, a laptop computer, awork station, and/or a network of such computing devices. As illustratedin FIG. 1A (and in more detail in FIG. 1B) user systems 12 mightinteract via a network 14 with an on-demand database service, which isimplemented in the example of FIG. 1A as database system 16.

An on-demand database service, such as system 16, is a database systemthat is made available to outside users, who do not need to necessarilybe concerned with building and/or maintaining the database system.Instead, the database system may be available for their use when theusers need the database system, i.e., on the demand of the users. Someon-demand database services may store information from one or moretenants into tables of a common database image to form a multi-tenantdatabase system (MTS). A database image may include one or more databaseobjects. A relational database management system (RDBMS) or theequivalent may execute storage and retrieval of information against thedatabase object(s). Application platform 18 may be a framework thatallows the applications of system 16 to run, such as the hardware and/orsoftware, e.g., the operating system. In some implementations,application platform 18 enables creation, managing and executing one ormore applications developed by the provider of the on-demand databaseservice, users accessing the on-demand database service via user systems12, or third party application developers accessing the on-demanddatabase service via user systems 12.

The users of user systems 12 may differ in their respective capacities,and the capacity of a particular user system 12 might be entirelydetermined by permissions (permission levels) for the current user. Forexample, where a salesperson is using a particular user system 12 tointeract with system 16, that user system has the capacities allotted tothat salesperson. However, while an administrator is using that usersystem to interact with system 16, that user system has the capacitiesallotted to that administrator. In systems with a hierarchical rolemodel, users at one permission level may have access to applications,data, and database information accessible by a lower permission leveluser, but may not have access to certain applications, databaseinformation, and data accessible by a user at a higher permission level.Thus, different users will have different capabilities with regard toaccessing and modifying application and database information, dependingon a user's security or permission level, also called authorization.

Network 14 is any network or combination of networks of devices thatcommunicate with one another. For example, network 14 can be any one orany combination of a LAN (local area network), WAN (wide area network),telephone network, wireless network, point-to-point network, starnetwork, token ring network, hub network, or other appropriateconfiguration. Network 14 can include a TCP/IP (Transfer ControlProtocol and Internet Protocol) network, such as the global internetworkof networks often referred to as the “Internet” with a capital “I.” TheInternet will be used in many of the examples herein. However, it shouldbe understood that the networks that the present implementations mightuse are not so limited, although TCP/IP is a frequently implementedprotocol.

User systems 12 might communicate with system 16 using TCP/IP and, at ahigher network level, use other common Internet protocols tocommunicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTPis used, user system 12 might include an HTTP client commonly referredto as a “browser” for sending and receiving HTTP signals to and from anHTTP server at system 16. Such an HTTP server might be implemented asthe sole network interface 20 between system 16 and network 14, butother techniques might be used as well or instead. In someimplementations, the network interface 20 between system 16 and network14 includes load sharing functionality, such as round-robin HTTP requestdistributors to balance loads and distribute incoming HTTP requestsevenly over a plurality of servers. At least for users accessing system16, each of the plurality of servers has access to the MTS' data;however, other alternative configurations may be used instead.

In one implementation, system 16, shown in FIG. 1A, implements aweb-based customer relationship management (CRM) system. For example, inone implementation, system 16 includes application servers configured toimplement and execute CRM software applications as well as providerelated data, code, forms, web pages and other information to and fromuser systems 12 and to store to, and retrieve from, a database systemrelated data, objects, and Webpage content. With a multi-tenant system,data for multiple tenants may be stored in the same physical databaseobject in tenant data storage 22, however, tenant data typically isarranged in the storage medium(s) of tenant data storage 22 so that dataof one tenant is kept logically separate from that of other tenants sothat one tenant does not have access to another tenant's data, unlesssuch data is expressly shared. In certain implementations, system 16implements applications other than, or in addition to, a CRMapplication. For example, system 16 may provide tenant access tomultiple hosted (standard and custom) applications, including a CRMapplication. User (or third party developer) applications, which may ormay not include CRM, may be supported by the application platform 18,which manages creation, storage of the applications into one or moredatabase objects and executing of the applications in a virtual machinein the process space of the system 16.

One arrangement for elements of system 16 is shown in FIGS. 1A and 1B,including a network interface 20, application platform 18, tenant datastorage 22 for tenant data 23, system data storage 24 for system data 25accessible to system 16 and possibly multiple tenants, program code 26for implementing various functions of system 16, and a process space 28for executing MTS system processes and tenant-specific processes, suchas running applications as part of an application hosting service.Additional processes that may execute on system 16 include databaseindexing processes.

Several elements in the system shown in FIG. 1A include conventional,well-known elements that are explained only briefly here. For example,each user system 12 could include a desktop personal computer,workstation, laptop, PDA, cell phone, or any wireless access protocol(WAP) enabled device or any other computing device capable ofinterfacing directly or indirectly to the Internet or other networkconnection. The term “computing device” is also referred to hereinsimply as a “computer”. User system 12 typically runs an HTTP client,e.g., a browsing program, such as Microsoft's Internet Explorer browser,Netscape's Navigator browser, Opera's browser, or a WAP-enabled browserin the case of a cell phone, PDA or other wireless device, or the like,allowing a user (e.g., subscriber of the multi-tenant database system)of user system 12 to access, process and view information, pages andapplications available to it from system 16 over network 14. Each usersystem 12 also typically includes one or more user interface devices,such as a keyboard, a mouse, trackball, touch pad, touch screen, pen orthe like, for interacting with a graphical user interface (GUI) providedby the browser on a display (e.g., a monitor screen, LCD display, etc.)of the computing device in conjunction with pages, forms, applicationsand other information provided by system 16 or other systems or servers.For example, the user interface device can be used to access data andapplications hosted by system 16, and to perform searches on storeddata, and otherwise allow a user to interact with various GUI pages thatmay be presented to a user. As discussed above, implementations aresuitable for use with the Internet, although other networks can be usedinstead of or in addition to the Internet, such as an intranet, anextranet, a virtual private network (VPN), a non-TCP/IP based network,any LAN or WAN or the like.

According to one implementation, each user system 12 and all of itscomponents are operator configurable using applications, such as abrowser, including computer code run using a central processing unitsuch as an Intel Pentium® processor or the like. Similarly, system 16(and additional instances of an MTS, where more than one is present) andall of its components might be operator configurable usingapplication(s) including computer code to run using processor system 17,which may be implemented to include a central processing unit, which mayinclude an Intel Pentium® processor or the like, and/or multipleprocessor units. A computer program product implementation includes anon-transitory computer-readable storage medium (media) havinginstructions stored thereon/in, which can be used to program a computingdevice to perform any of the processes/methods of the implementationsdescribed herein. Computer program code 26 for operating and configuringsystem 16 to intercommunicate and to process web pages, applications andother data and media content as described herein is preferablydownloadable and stored on a hard disk, but the entire program code, orportions thereof, may also be stored in any other volatile ornon-volatile memory medium or device as is well known, such as a ROM orRAM, or provided on any media capable of storing program code, such asany type of rotating media including floppy disks, optical discs,digital versatile disk (DVD), compact disk (CD), microdrive, andmagneto-optical disks, and magnetic or optical cards, nanosystems(including molecular memory ICs), or any type of media or devicesuitable for storing instructions and/or data. Additionally, the entireprogram code, or portions thereof, may be transmitted and downloadedfrom a software source over a transmission medium, e.g., over theInternet, or from another server, as is well known, or transmitted overany other conventional network connection as is well known (e.g.,extranet, VPN, LAN, etc.) using any communication medium and protocols(e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as are well known. It willalso be appreciated that computer code for the disclosed implementationscan be realized in any programming language that can be executed on aclient system and/or server or server system such as, for example, C,C++, HTML, any other markup language, Java™, JavaScript, ActiveX, anyother scripting language, such as VBScript, and many other programminglanguages as are well known may be used. (Java™ is a trademark of SunMicrosystems, Inc.).

According to some implementations, each system 16 is configured toprovide web pages, forms, applications, data and media content to user(client) systems 12 to support the access by user systems 12 as tenantsof system 16. As such, system 16 provides security mechanisms to keepeach tenant's data separate unless the data is shared. If more than oneMTS is used, they may be located in close proximity to one another(e.g., in a server farm located in a single building or campus), or theymay be distributed at locations remote from one another (e.g., one ormore servers located in city A and one or more servers located in cityB). As used herein, each MTS could include one or more logically and/orphysically connected servers distributed locally or across one or moregeographic locations. Additionally, the term “server” is meant to referto a computing device or system, including processing hardware andprocess space(s), an associated storage system such as a memory deviceor database, and, in some instances, a database application (e.g.,OODBMS or RDBMS) as is well known in the art. It should also beunderstood that “server system” and “server” are often usedinterchangeably herein. Similarly, the database objects described hereincan be implemented as single databases, a distributed database, acollection of distributed databases, a database with redundant online oroffline backups or other redundancies, etc., and might include adistributed database or storage network and associated processingintelligence.

FIG. 1B shows a block diagram of an example of some implementations ofelements of FIG. 1A and various possible interconnections between theseelements. That is, FIG. 1B also illustrates environment 10. However, inFIG. 1B elements of system 16 and various interconnections in someimplementations are further illustrated. FIG. 1B shows that user system12 may include processor system 12A, memory system 12B, input system12C, and output system 12D. FIG. 1B shows network 14 and system 16. FIG.1B also shows that system 16 may include tenant data storage 22, tenantdata 23, system data storage 24, system data 25, User Interface (UI) 30,Application Program Interface (API) 32, PL/SOQL 34, save routines 36,application setup mechanism 38, applications servers 1001-100N, systemprocess space 102, tenant process spaces 104, tenant management processspace 110, tenant storage area 112, user storage 114, and applicationmetadata 116. In other implementations, environment 10 may not have thesame elements as those listed above and/or may have other elementsinstead of, or in addition to, those listed above.

User system 12, network 14, system 16, tenant data storage 22, andsystem data storage 24 were discussed above in FIG. 1A. Regarding usersystem 12, processor system 12A may be any combination of one or moreprocessors. Memory system 12B may be any combination of one or morememory devices, short term, and/or long term memory. Input system 12Cmay be any combination of input devices, such as one or more keyboards,mice, trackballs, scanners, cameras, and/or interfaces to networks.Output system 12D may be any combination of output devices, such as oneor more monitors, printers, and/or interfaces to networks. As shown byFIG. 1B, system 16 may include a network interface 20 (of FIG. 1A)implemented as a set of HTTP application servers 100, an applicationplatform 18, tenant data storage 22, and system data storage 24. Alsoshown is system process space 102, including individual tenant processspaces 104 and a tenant management process space 110. Each applicationserver 100 may be configured to communicate with tenant data storage 22and the tenant data 23 therein, and system data storage 24 and thesystem data 25 therein to serve requests of user systems 12. The tenantdata 23 might be divided into individual tenant storage areas 112, whichcan be either a physical arrangement and/or a logical arrangement ofdata. Within each tenant storage area 112, user storage 114 andapplication metadata 116 might be similarly allocated for each user. Forexample, a copy of a user's most recently used (MRU) items might bestored to user storage 114. Similarly, a copy of MRU items for an entireorganization that is a tenant might be stored to tenant storage area112. A UI 30 provides a user interface and an API 32 provides anapplication programmer interface to system 16 resident processes tousers and/or developers at user systems 12. The tenant data and thesystem data may be stored in various databases, such as one or moreOracle databases.

Application platform 18 includes an application setup mechanism 38 thatsupports application developers' creation and management ofapplications, which may be saved as metadata into tenant data storage 22by save routines 36 for execution by subscribers as one or more tenantprocess spaces 104 managed by tenant management process 110 for example.Invocations to such applications may be coded using PL/SOQL 34 thatprovides a programming language style interface extension to API 32. Adetailed description of some PL/SOQL language implementations isdiscussed in commonly assigned U.S. Pat. No. 7,730,478, titled METHODAND SYSTEM FOR ALLOWING ACCESS TO DEVELOPED APPLICATIONS VIA AMULTI-TENANT ON-DEMAND DATABASE SERVICE, by Craig Weissman, issued onJun. 1, 2010, and hereby incorporated by reference in its entirety andfor all purposes. Invocations to applications may be detected by one ormore system processes, which manage retrieving application metadata 116for the subscriber making the invocation and executing the metadata asan application in a virtual machine.

Each application server 100 may be communicably coupled to databasesystems, e.g., having access to system data 25 and tenant data 23, via adifferent network connection. For example, one application server 1001might be coupled via the network 14 (e.g., the Internet), anotherapplication server 100N−1 might be coupled via a direct network link,and another application server 100N might be coupled by yet a differentnetwork connection. Transfer Control Protocol and Internet Protocol(TCP/IP) are typical protocols for communicating between applicationservers 100 and the database system. However, it will be apparent to oneskilled in the art that other transport protocols may be used tooptimize the system depending on the network interconnect used.

In certain implementations, each application server 100 is configured tohandle requests for any user associated with any organization that is atenant. Because it is desirable to be able to add and remove applicationservers from the server pool at any time for any reason, there ispreferably no server affinity for a user and/or organization to aspecific application server 100. In one implementation, therefore, aninterface system implementing a load balancing function (e.g., an F5Big-IP load balancer) is communicably coupled between the applicationservers 100 and the user systems 12 to distribute requests to theapplication servers 100. In one implementation, the load balancer uses aleast connections algorithm to route user requests to the applicationservers 100. Other examples of load balancing algorithms, such as roundrobin and observed response time, also can be used. For example, incertain implementations, three consecutive requests from the same usercould hit three different application servers 100, and three requestsfrom different users could hit the same application server 100. In thismanner, by way of example, system 16 is multi-tenant, wherein system 16handles storage of, and access to, different objects, data andapplications across disparate users and organizations.

As an example of storage, one tenant might be a company that employs asales force where each salesperson uses system 16 to manage their salesprocess. Thus, a user might maintain contact data, leads data, customerfollow-up data, performance data, goals and progress data, etc., allapplicable to that user's personal sales process (e.g., in tenant datastorage 22). In an example of a MTS arrangement, since all of the dataand the applications to access, view, modify, report, transmit,calculate, etc., can be maintained and accessed by a user system havingnothing more than network access, the user can manage his or her salesefforts and cycles from any of many different user systems. For example,if a salesperson is visiting a customer and the customer has Internetaccess in their lobby, the salesperson can obtain critical updates as tothat customer while waiting for the customer to arrive in the lobby.

While each user's data might be separate from other users' dataregardless of the employers of each user, some data might beorganization-wide data shared or accessible by a plurality of users orall of the users for a given organization that is a tenant. Thus, theremight be some data structures managed by system 16 that are allocated atthe tenant level while other data structures might be managed at theuser level. Because an MTS might support multiple tenants includingpossible competitors, the MTS should have security protocols that keepdata, applications, and application use separate. Also, because manytenants may opt for access to an MTS rather than maintain their ownsystem, redundancy, up-time, and backup are additional functions thatmay be implemented in the MTS. In addition to user-specific data andtenant-specific data, system 16 might also maintain system level datausable by multiple tenants or other data. Such system level data mightinclude industry reports, news, postings, and the like that are sharableamong tenants.

In certain implementations, user systems 12 (which may be clientsystems) communicate with application servers 100 to request and updatesystem-level and tenant-level data from system 16 that may requiresending one or more queries to tenant data storage 22 and/or system datastorage 24. System 16 (e.g., an application server 100 in system 16)automatically generates one or more SQL statements (e.g., one or moreSQL queries) that are designed to access the desired information. Systemdata storage 24 may generate query plans to access the requested datafrom the database.

Each database can generally be viewed as a collection of objects, suchas a set of logical tables, containing data fitted into predefinedcategories. A “table” is one representation of a data object, and may beused herein to simplify the conceptual description of objects and customdata structures according to some implementations. It should beunderstood that “table” and “object” may be used interchangeably herein.Each table generally contains one or more data categories logicallyarranged as columns or fields in a viewable schema. Each row or recordof a table contains an instance of data for each category defined by thefields. For example, a CRM database may include a table that describes acustomer with fields for basic contact information such as name,address, phone number, fax number, etc. Another table might describe apurchase order, including fields for information such as customer,product, sale price, date, etc. In some multi-tenant database systems,standard entity tables might be provided for use by all tenants. For CRMdatabase applications, such standard entities might include tables forcase, account, contact, lead, and opportunity data objects, eachcontaining pre-defined fields. It should be understood that the word“entity” may also be used interchangeably herein with “object” and“table”.

In some multi-tenant database systems, tenants may be allowed to createand store custom data structures, or they may be allowed to customizestandard entities or objects, for example by creating custom fields forstandard objects, including custom index fields. Commonly assigned U.S.Pat. No. 7,779,039, titled CUSTOM ENTITIES AND FIELDS IN A MULTI-TENANTDATABASE SYSTEM, by Weissman et al., issued on Aug. 17, 2010, and herebyincorporated by reference in its entirety and for all purposes, teachessystems and methods for creating custom data structures as well ascustomizing standard objects in a multi-tenant database system. Incertain implementations, for example, all custom entity data rows arestored in a single multi-tenant physical table, which may containmultiple logical tables per organization. It is transparent to customersthat their multiple “tables” are in fact stored in one large table orthat their data may be stored in the same table as the data of othercustomers.

FIG. 2A shows a system diagram illustrating an example of architecturalcomponents of an on-demand service environment 200 according to someimplementations. A client machine located in the cloud 204, generallyreferring to one or more networks in combination, as described herein,may communicate with the on-demand service environment via one or moreedge routers 208 and 212. A client machine can be any of the examples ofuser systems 12 described above. The edge routers may communicate withone or more core switches 220 and 224 via firewall 216. The coreswitches may communicate with a load balancer 228, which may distributeserver load over different pods, such as the pods 240 and 244. The pods240 and 244, which may each include one or more servers and/or othercomputing resources, may perform data processing and other operationsused to provide on-demand services. Communication with the pods may beconducted via pod switches 232 and 236. Components of the on-demandservice environment may communicate with a database storage 256 via adatabase firewall 248 and a database switch 252.

As shown in FIGS. 2A and 2B, accessing an on-demand service environmentmay involve communications transmitted among a variety of differenthardware and/or software components. Further, the on-demand serviceenvironment 200 is a simplified representation of an actual on-demandservice environment. For example, while only one or two devices of eachtype are shown in FIGS. 2A and 2B, some implementations of an on-demandservice environment may include anywhere from one to many devices ofeach type. Also, the on-demand service environment need not include eachdevice shown in FIGS. 2A and 2B, or may include additional devices notshown in FIGS. 2A and 2B.

Moreover, one or more of the devices in the on-demand serviceenvironment 200 may be implemented on the same physical device or ondifferent hardware. Some devices may be implemented using hardware or acombination of hardware and software. Thus, terms such as “dataprocessing apparatus,” “machine,” “server” and “device” as used hereinare not limited to a single hardware device, but rather include anyhardware and software configured to provide the described functionality.

The cloud 204 is intended to refer to a data network or plurality ofdata networks, often including the Internet. Client machines located inthe cloud 204 may communicate with the on-demand service environment toaccess services provided by the on-demand service environment. Forexample, client machines may access the on-demand service environment toretrieve, store, edit, and/or process information.

In some implementations, the edge routers 208 and 212 route packetsbetween the cloud 204 and other components of the on-demand serviceenvironment 200. The edge routers 208 and 212 may employ the BorderGateway Protocol (BGP). The BGP is the core routing protocol of theInternet. The edge routers 208 and 212 may maintain a table of IPnetworks or ‘prefixes’, which designate network reachability amongautonomous systems on the Internet.

In one or more implementations, the firewall 216 may protect the innercomponents of the on-demand service environment 200 from Internettraffic. The firewall 216 may block, permit, or deny access to the innercomponents of the on-demand service environment 200 based upon a set ofrules and other criteria. The firewall 216 may act as one or more of apacket filter, an application gateway, a stateful filter, a proxyserver, or any other type of firewall.

In some implementations, the core switches 220 and 224 are high-capacityswitches that transfer packets within the on-demand service environment200. The core switches 220 and 224 may be configured as network bridgesthat quickly route data between different components within theon-demand service environment. In some implementations, the use of twoor more core switches 220 and 224 may provide redundancy and/or reducedlatency.

In some implementations, the pods 240 and 244 may perform the core dataprocessing and service functions provided by the on-demand serviceenvironment. Each pod may include various types of hardware and/orsoftware computing resources. An example of the pod architecture isdiscussed in greater detail with reference to FIG. 2B.

In some implementations, communication between the pods 240 and 244 maybe conducted via the pod switches 232 and 236. The pod switches 232 and236 may facilitate communication between the pods 240 and 244 and clientmachines located in the cloud 204, for example via core switches 220 and224. Also, the pod switches 232 and 236 may facilitate communicationbetween the pods 240 and 244 and the database storage 256.

In some implementations, the load balancer 228 may distribute workloadbetween the pods 240 and 244. Balancing the on-demand service requestsbetween the pods may assist in improving the use of resources,increasing throughput, reducing response times, and/or reducingoverhead. The load balancer 228 may include multilayer switches toanalyze and forward traffic.

In some implementations, access to the database storage 256 may beguarded by a database firewall 248. The database firewall 248 may act asa computer application firewall operating at the database applicationlayer of a protocol stack. The database firewall 248 may protect thedatabase storage 256 from application attacks such as structure querylanguage (SQL) injection, database rootkits, and unauthorizedinformation disclosure.

In some implementations, the database firewall 248 may include a hostusing one or more forms of reverse proxy services to proxy trafficbefore passing it to a gateway router. The database firewall 248 mayinspect the contents of database traffic and block certain content ordatabase requests. The database firewall 248 may work on the SQLapplication level atop the TCP/IP stack, managing applications'connection to the database or SQL management interfaces as well asintercepting and enforcing packets traveling to or from a databasenetwork or application interface.

In some implementations, communication with the database storage 256 maybe conducted via the database switch 252. The multi-tenant databasestorage 256 may include more than one hardware and/or softwarecomponents for handling database queries. Accordingly, the databaseswitch 252 may direct database queries transmitted by other componentsof the on-demand service environment (e.g., the pods 240 and 244) to thecorrect components within the database storage 256.

In some implementations, the database storage 256 is an on-demanddatabase system shared by many different organizations. The on-demanddatabase system may employ a multi-tenant approach, a virtualizedapproach, or any other type of database approach. An on-demand databasesystem is discussed in greater detail with reference to FIGS. 1A and 1B.

FIG. 2B shows a system diagram further illustrating an example ofarchitectural components of an on-demand service environment accordingto some implementations. The pod 244 may be used to render services to auser of the on-demand service environment 200. In some implementations,each pod may include a variety of servers and/or other systems. The pod244 includes one or more content batch servers 264, content searchservers 268, query servers 282, file force servers 286, access controlsystem (ACS) servers 280, batch servers 284, and app servers 288. Also,the pod 244 includes database instances 290, quick file systems (QFS)292, and indexers 294. In one or more implementations, some or allcommunication between the servers in the pod 244 may be transmitted viathe switch 236.

In some implementations, the app servers 288 may include a hardwareand/or software framework dedicated to the execution of procedures(e.g., programs, routines, scripts) for supporting the construction ofapplications provided by the on-demand service environment 200 via thepod 244. In some implementations, the hardware and/or software frameworkof an app server 288 is configured to execute operations of the servicesdescribed herein, including performance of the blocks ofmethods/processes described with reference to FIGS. 15-23. Inalternative implementations, two or more app servers 288 may be includedand cooperate to perform such methods, or one or more other servers inFIG. 2B can be configured to perform the disclosed methods.

The content batch servers 264 may requests internal to the pod. Theserequests may be long-running and/or not tied to a particular customer.For example, the content batch servers 264 may handle requests relatedto log mining, cleanup work, and maintenance tasks.

The content search servers 268 may provide query and indexer functions.For example, the functions provided by the content search servers 268may allow users to search through content stored in the on-demandservice environment.

The file force servers 286 may manage requests information stored in theFileforce storage 278. The Fileforce storage 278 may store informationsuch as documents, images, and basic large objects (BLOBs). By managingrequests for information using the file force servers 286, the imagefootprint on the database may be reduced.

The query servers 282 may be used to retrieve information from one ormore file systems. For example, the query system 282 may receiverequests for information from the app servers 288 and then transmitinformation queries to the NFS 296 located outside the pod.

The pod 244 may share a database instance 290 configured as amulti-tenant environment in which different organizations share accessto the same database. Additionally, services rendered by the pod 244 mayrequire various hardware and/or software resources. In someimplementations, the ACS servers 280 may control access to data,hardware resources, or software resources.

In some implementations, the batch servers 284 may process batch jobs,which are used to run tasks at specified times. Thus, the batch servers284 may transmit instructions to other servers, such as the app servers288, to trigger the batch jobs.

In some implementations, the QFS 292 may be an open source file systemavailable from Sun Microsystems® of Santa Clara, Calif. The QFS mayserve as a rapid-access file system for storing and accessinginformation available within the pod 244. The QFS 292 may support somevolume management capabilities, allowing many disks to be groupedtogether into a file system. File system metadata can be kept on aseparate set of disks, which may be useful for streaming applicationswhere long disk seeks cannot be tolerated. Thus, the QFS system maycommunicate with one or more content search servers 268 and/or indexers294 to identify, retrieve, move, and/or update data stored in thenetwork file systems 296 and/or other storage systems.

In some implementations, one or more query servers 282 may communicatewith the NFS 296 to retrieve and/or update information stored outside ofthe pod 244. The NFS 296 may allow servers located in the pod 244 toaccess information to access files over a network in a manner similar tohow local storage is accessed.

In some implementations, queries from the query servers 222 may betransmitted to the NFS 296 via the load balancer 228, which maydistribute resource requests over various resources available in theon-demand service environment. The NFS 296 may also communicate with theQFS 292 to update the information stored on the NFS 296 and/or toprovide information to the QFS 292 for use by servers located within thepod 244.

In some implementations, the pod may include one or more databaseinstances 290. The database instance 290 may transmit information to theQFS 292. When information is transmitted to the QFS, it may be availablefor use by servers within the pod 244 without requiring an additionaldatabase call.

In some implementations, database information may be transmitted to theindexer 294. Indexer 294 may provide an index of information availablein the database 290 and/or QFS 292. The index information may beprovided to file force servers 286 and/or the QFS 292.

III. Tracking Updates To A Record Stored In A Database

As multiple users might be able to change the data of a record, it canbe useful for certain users to be notified when a record is updated.Also, even if a user does not have authority to change a record, theuser still might want to know when there is an update to the record. Forexample, a vendor may negotiate a new price with a salesperson ofcompany X, where the salesperson is a user associated with tenant Y. Aspart of creating a new invoice or for accounting purposes, thesalesperson can change the price saved in the database. It may beimportant for co-workers to know that the price has changed. Thesalesperson could send an e-mail to certain people, but this is onerousand the salesperson might not e-mail all of the people who need to knowor want to know. Accordingly, some implementations of the disclosedtechniques can inform others (e.g., co-workers) who want to know aboutan update to a record automatically.

FIG. 3 shows a flowchart of an example of a method 300 for trackingupdates to a record stored in a database system, performed in accordancewith some implementations. Method 300 (and other methods describedherein) may be implemented at least partially with multi-tenant databasesystem 16, e.g., by one or more processors configured to receive orretrieve information, process the information, store results, andtransmit the results. In other implementations, method 300 may beimplemented at least partially with a single tenant database system. Invarious implementations, blocks may be omitted, combined, or split intoadditional blocks for method 300, as well as for other methods describedherein.

In block 310, the database system receives a request to update a firstrecord. In one implementation, the request is received from a firstuser. For example, a user may be accessing a page associated with thefirst record, and may change a displayed field and hit save. In anotherimplementation, the database system can automatically create therequest. For instance, the database system can create the request inresponse to another event, e.g., a request to change a field could besent periodically at a particular date and/or time of day, or a changeto another field or object. The database system can obtain a new valuebased on other fields of a record and/or based on parameters in thesystem.

The request for the update of a field of a record is an example of anevent associated with the first record for which a feed tracked updatemay be created. In other implementations, the database system canidentify other events besides updates to fields of a record. Forexample, an event can be a submission of approval to change a field.Such an event can also have an associated field (e.g., a field showing astatus of whether a change has been submitted). Other examples of eventscan include creation of a record, deletion of a record, converting arecord from one type to another (e.g., converting a lead to anopportunity), closing a record (e.g., a case type record), andpotentially any other state change of a record—any of which couldinclude a field change associated with the state change. Any of theseevents update the record whether by changing a field of the record, astate of the record, or some other characteristic or property of therecord. In one implementation, a list of supported events for creating afeed tracked update can be maintained within the database system, e.g.,at a server or in a database.

In block 320, the database system writes new data to the first record.In one implementation, the new data may include a new value thatreplaces old data. For example, a field is updated with a new value. Inanother implementation, the new data can be a value for a field that didnot contain data before. In yet another implementation, the new datacould be a flag, e.g., for a status of the record, which can be storedas a field of the record.

In some implementations, a “field” can also include records, which arechild objects of the first record in a parent-child hierarchy. A fieldcan alternatively include a pointer to a child record. A child objectitself can include further fields. Thus, if a field of a child object isupdated with a new value, the parent record also can be considered tohave a field changed. In one example, a field could be a list of relatedchild objects, also called a related list.

In block 330, a feed tracked update is generated about the update to therecord. In one implementation, the feed tracked update is created inparts for assembling later into a display version. For example, evententries can be created and tracked in one table, and changed fieldentries can be tracked in another table that is cross-referenced withthe first table. More specifics of such implementations are providedlater, e.g., with respect to FIG. 9A. In another implementation, thefeed tracked update is automatically generated by the database system.The feed tracked update can convey in words that the first record hasbeen updated and provide details about what was updated in the recordand who performed the update. In some implementations, a feed trackedupdate is generated for only certain types of event and/or updatesassociated with the first record.

In one implementation, a tenant (e.g., through an administrator) canconfigure the database system to create (enable) feed tracked updatesonly for certain types of records. For example, an administrator canspecify that records of designated types such as accounts andopportunities are enabled. When an update (or other event) is receivedfor the enabled record type, then a feed tracked update would begenerated. In another implementation, a tenant can also specify thefields of a record whose changes are to be tracked, and for which feedtracked updates are created. In one aspect, a maximum number of fieldscan be specified for tracking, and may include custom fields. In oneimplementation, the type of change can also be specified, for example,that the value change of a field is required to be larger than athreshold (e.g., an absolute amount or a percentage change). In yetanother implementation, a tenant can specify which events are to cause ageneration of a feed tracked update. Also, in one implementation,individual users can specify configurations specific to them, which cancreate custom feeds as described in more detail below.

In one implementation, changes to fields of a child object are nottracked to create feed tracked updates for the parent record. In anotherimplementation, the changes to fields of a child object can be trackedto create feed tracked updates for the parent record. For example, achild object of the parent type can be specified for tracking, andcertain fields of the child object can be specified for tracking. Asanother example, if the child object is of a type specified fortracking, then a tracked change for the child object is propagated toparent records of the child object.

In block 340, the feed tracked update is added to a feed for the firstrecord. In one implementation, adding the feed tracked update to a feedcan include adding events to a table (which may be specific to a recordor be for all or a group of objects), where a display version of a feedtracked update can be generated dynamically and presented as aninformation update when a user requests a feed for the first record. Inanother implementation, a display version of a feed tracked update canbe added when a record feed is stored and maintained for a record. Asmentioned above, a feed may be maintained for only certain records. Inone implementation, the feed of a record can be stored in the databaseassociated with the record. For example, the feed can be stored as afield (e.g., as a child object) of the record. Such a field can store apointer to the text to be displayed for the feed tracked update.

In some implementations, only the current feed tracked update (or othercurrent feed item) may be kept or temporarily stored, e.g., in sometemporary memory structure. For example, a feed tracked update for onlya most recent change to any particular field is kept. In otherimplementations, many previous feed tracked updates may be kept in thefeed. A time and/or date for each feed tracked update can be tracked.Herein, a feed of a record is also referred to as an entity feed, as arecord is an instance of a particular entity object of the database.

In block 350, followers of the first record can be identified. Afollower is a user following the first record, such as a subscriber tothe feed of the first record. In one implementation, when a userrequests a feed of a particular record, such an identification of block350 can be omitted. In another implementation where a record feed ispushed to a user (e.g., as part of a news feed), then the user can beidentified as a follower of the first record. Accordingly, this blockcan include the identification of records and other objects beingfollowed by a particular user.

In one implementation, the database system can store a list of thefollowers for a particular record. In various implementations, the listcan be stored with the first record or associated with the record usingan identifier (e.g., a pointer) to retrieve the list. For example, thelist can be stored in a field of the first record. In anotherimplementation, a list of the records that a user is following is used.In one implementation, the database system can have a routine that runsfor each user, where the routine polls the records in the list todetermine if a new feed tracked update has been added to a feed of therecord. In another implementation, the routine for the user can berunning at least partially on a user device, which contacts the databaseto perform the polling.

In block 360, in one implementation, the feed tracked update can bestored in a table, as described in greater detail below. When the useropens a feed, an appropriate query is sent to one or more tables toretrieve updates to records, also described in greater detail below. Insome implementations, the feed shows feed tracked updates in reversechronological order. In one implementation, the feed tracked update ispushed to the feed of a user, e.g., by a routine that determines thefollowers for the record from a list associated with the record. Inanother implementation, the feed tracked update is pulled to a feed,e.g., by a user device. This pulling may occur when a user requests thefeed, as occurs in block 370. Thus, these actions may occur in adifferent order. The creation of the feed for a pull may be a dynamiccreation that identifies records being followed by the requesting user,generates the display version of relevant feed tracked updates fromstored information (e.g., event and field change), and adds the feedtracked updates into the feed. A feed of feed tracked updates of recordsand other objects that a user is following is also generally referred toherein as a news feed, which can be a subset of a larger informationfeed in which other types of information updates appear, such as posts.

In yet another implementation, the feed tracked update could be sent asan e-mail to the follower, instead of in a feed. In one implementation,e-mail alerts for events can enable people to be e-mailed when certainevents occur. In another implementation, e-mails can be sent when thereare posts on a user profile and posts on entities to which the usersubscribes. In one implementation, a user can turn on/off email alertsfor all or some events. In an implementation, a user can specify whatkind of feed tracked updates to receive about a record that the user isfollowing. For example, a user can choose to only receive feed trackedupdates about certain fields of a record that the user is following, andpotentially about what kind of update was performed (e.g., a new valueinput into a specified field, or the creation of a new field).

In block 370, a follower can access his/her news feed to see the feedtracked update. In one implementation, the user has just one news feedfor all of the records that the user is following. In one aspect, a usercan access his/her own feed by selecting a particular tab or otherobject on a page of an interface to the database system. Once selectedthe feed can be provided as a list, e.g., with an identifier (e.g., atime) or including some or all of the text of the feed tracked update.In another implementation, the user can specify how the feed trackedupdates are to be displayed and/or sent to the user. For example, a usercan specify a font for the text, a location of where the feed can beselected and displayed, amount of text to be displayed, and other textor symbols to be displayed (e.g., importance flags).

FIG. 4 shows a block diagram of an example of components of a databasesystem configuration 400 performing a method for tracking an update to arecord according to some implementations. Database system configuration400 can perform implementations of method 300, as well asimplementations of other methods described herein.

A first user 405 sends a request 1 to update record 425 in databasesystem 416. Although an update request is described, other events thatare being tracked are equally applicable. In various implementations,the request 1 can be sent via a user interface (e.g., 30 of FIG. 1B) oran application program interface (e.g., API 32). An I/O port 420 canaccommodate the signals of request 1 via any input interface, and sendthe signals to one or more processors 417. The processor 417 can analyzethe request and determine actions to be performed. Herein, any referenceto a processor 417 can refer to a specific processor or any set ofprocessors in database system 416, which can be collectively referred toas processor 417.

Processor 417 can determine an identifier for record 425, and sendcommands with the new data 2 of the request to record database 412 toupdate record 425. In one implementation, record database 412 is wheretenant data 112 of FIG. 1B is stored. The request 1 and new datacommands 2 can be encapsulated in a single write transaction sent torecord database 412. In one implementation, multiple changes to recordsin the database can be made in a single write transaction.

Processor 417 can also analyze request 1 to determine whether a feedtracked update is to be created, which at this point may includedetermining whether the event (e.g., a change to a particular field) isto be tracked. This determination can be based on an interaction (i.e.,an exchange of data) with record database 412 and/or other databases, orbased on information stored locally (e.g., in cache or RAM) at processor417. In one implementation, a list of record types that are beingtracked can be stored. The list may be different for each tenant, e.g.,as each tenant may configure the database system to its ownspecifications. Thus, if the record 425 is of a type not being tracked,then the determination of whether to create a feed tracked update canstop there.

The same list or a second list (which can be stored in a same locationor a different location) can also include the fields and/or events thatare tracked for the record types in the first list. This list can besearched to determine if the event is being tracked. A list may alsocontain information having the granularity of listing specific recordsthat are to be tracked (e.g., if a tenant can specify the particularrecords to be tracked, as opposed to just type).

As an example, processor 417 may obtain an identifier associated withrecord 425 (e.g., obtained from request 1 or database 412), potentiallyalong with a tenant identifier, and cross-reference the identifier witha list of records for which feed tracked updates are to be created.Specifically, the record identifier can be used to determine the recordtype and a list of tracked types can be searched for a match. Thespecific record may also be checked if such individual record trackingwas enabled. The name of the field to be changed can also be used tosearch a list of tracking-enabled fields. Other criteria besides fieldand events can be used to determine whether a feed tracked update iscreated, e.g., type of change in the field. If a feed tracked update isto be generated, processor 417 can then generate the feed trackedupdate.

In some implementations, a feed tracked update is created dynamicallywhen a feed (e.g., the entity feed of record 425) is requested. Thus, inone implementation, a feed tracked update can be created when a userrequests the entity feed for record 425. In this implementation, thefeed tracked update may be created (e.g., assembled), includingre-created, each time the entity feed is to be displayed to any user. Inone implementation, one or more hifeed tracked update tables can keeptrack of previous events so that the feed tracked update can bere-created.

In another implementation, a feed tracked update can be created at thetime the event occurs, and the feed tracked update can be added to alist of feed items. The list of feed items may be specific to record425, or may be an aggregate of feed items including feed items for manyrecords. Such an aggregate list can include a record identifier so thatthe feed items for the entity feed of record 425 can be easilyretrieved. For example, after the feed tracked update has beengenerated, processor 417 can add the new feed tracked update 3 to a feedof record 425. As mentioned above, in one implementation, the feed canbe stored in a field (e.g., as a child object) of record 425. In anotherimplementation, the feed can be stored in another location or in anotherdatabase, but with a link (e.g., a connecting identifier) to record 425.The feed can be organized in various ways, e.g., as a linked list, anarray, or other data structure.

A second user 430 can access the new feed tracked update 3 in variousways. In one implementation, second user 430 can send a request 4 forthe record feed. For example, second user 430 can access a home page(detail page) of the record 425 (e.g., with a query or by browsing), andthe feed can be obtained through a tab, button, or other activationobject on the page. The feed can be displayed on the screen ordownloaded.

In another implementation, processor 417 can add the new feed trackedupdate 5 to a feed (e.g., a news feed) of a user that is followingrecord 425. In one implementation, processor 417 can determine each ofthe followers of record 425 by accessing a list of the users that havebeen registered as followers. This determination can be done for eachnew event (e.g., update 1). In another implementation, processor 417 canpoll (e.g., with a query) the records that second user 430 is followingto determine when new feed tracked updates (or other feed items) areavailable. Processor 417 can use a follower profile 435 of second user430 that can contain a list of the records that the second user 430 isfollowing. Such a list can be contained in other parts of the databaseas well. Second user 430 can then send a request 6 to his/her profile435 to obtain a feed, which contains the new feed tracked update. Theuser's profile 435 can be stored in a profile database 414, which can bethe same or different than database 412.

In some implementations, a user can define a news feed to include newfeed tracked updates from various records, which may be limited to amaximum number. In one implementation, each user has one news feed. Inanother implementation, the follower profile 435 can include thespecifications of each of the records to be followed (with the criteriafor what feed tracked updates are to be provided and how they aredisplayed), as well as the feed.

Some implementations can provide various types of record (entity) feeds.Entity Feeds can exist for record types like account, opportunity, case,and contact. An entity feed can tell a user about the actions thatpeople have taken on that particular record or on one its relatedrecords. The entity feed can include who made the action, which fieldwas changed, and the old and new values. In one implementation, entityfeeds can exist on all supported records as a list that is linked to thespecific record. For example, a feed could be stored in a field thatallows lists (e.g., linked lists) or as a child object.

IV. Tracking Actions Of A User

In addition to knowing about events associated with a particular record,it can be helpful for a user to know what a particular user is doing. Inparticular, it might be nice to know what the user is doing without theuser having to generate the feed tracked update (e.g., a user submittinga synopsis of what the user has done). Accordingly, implementations canautomatically track actions of a user that trigger events, and feedtracked updates can be generated for certain events.

FIG. 5 shows a flowchart of an example of a method 500 for trackingactions of a user of a database system, performed in accordance withsome implementations. Method 500 may be performed in addition to method300. The operations of method 300, including order of blocks, can beperformed in conjunction with method 500 and other methods describedherein. Thus, a feed can be composed of changes to a record and actionsof users.

In block 510, a database system (e.g., 16 of FIGS. 1A and 1B) identifiesan action of a first user. In one implementation, the action triggers anevent, and the event is identified. For example, the action of a userrequesting an update to a record can be identified, where the event isreceiving a request or is the resulting update of a record. The actionmay thus be defined by the resulting event. In another implementation,only certain types of actions (events) are identified. Which actions areidentified can be set as a default or can be configurable by a tenant,or even configurable at a user level. In this way, processing effort canbe reduced since only some actions are identified.

In block 520, it is determined whether the event qualifies for a feedtracked update. In one implementation, a predefined list of events(e.g., as mentioned herein) can be created so that only certain actionsare identified. In one implementation, an administrator (or other user)of a tenant can specify the type of actions (events) for which a feedtracked update is to be generated. This block may also be performed formethod 300.

In block 530, a feed tracked update is generated about the action. In anexample where the action is an update of a record, the feed trackedupdate can be similar or the same as the feed tracked update created forthe record. The description can be altered though to focus on the useras opposed to the record. For example, “John D. has closed a newopportunity for account XYZ” as opposed to “an opportunity has beenclosed for account XYZ.”

In block 540, the feed tracked update is added to a profile feed of thefirst user when, e.g., the user clicks on a tab to open a page in abrowser program displaying the feed. In one implementation, a feed for aparticular user can be accessed on a page of the user's profile, in asimilar manner as a record feed can be accessed on a detail page of therecord. In another implementation, the first user may not have a profilefeed and the feed tracked update may just be stored temporarily beforeproceeding. A profile feed of a user can be stored associated with theuser's profile. This profile feed can be added to a news feed of anotheruser.

In block 550, followers of the first user are identified. In oneimplementation, a user can specify which type of actions other users canfollow. Similarly, in one implementation, a follower can select whatactions by a user the follower wants to follow. In an implementationwhere different followers follow different types of actions, which usersare followers of that user and the particular action can be identified,e.g., using various lists that track what actions and criteria are beingfollowed by a particular user. In various implementations, the followersof the first user can be identified in a similar manner as followers ofa record, as described above for block 350.

In block 560, the feed tracked update is added to a news feed of eachfollower of the first user when, e.g., the follower clicks on a tab toopen a page displaying the news feed. The feed tracked update can beadded in a similar manner as the feed items for a record feed. The newsfeed can contain feed tracked updates both about users and records. Inanother implementation, a user can specify what kind of feed trackedupdates to receive about a user that the user is following. For example,a user could specify feed tracked updates with particular keywords, ofcertain types of records, of records owned or created by certain users,particular fields, and other criteria as mentioned herein.

In block 570, a follower accesses the news feed and sees the feedtracked update. In one implementation, the user has just one news feedfor all of the records that the user is following. In anotherimplementation, a user can access his/her own feed (i.e. feed abouthis/her own actions) by selecting a particular tab or other object on apage of an interface to the database system. Thus, a feed can includefeed tracked updates about what other users are doing in the databasesystem. When a user becomes aware of a relevant action of another user,the user can contact the co-worker, thereby fostering teamwork.

V. Generation Of A Feed Tracked Update

As described above, some implementations can generate text describingevents (e.g., updates) that have occurred for a record and actions by auser that trigger an event. A database system can be configured togenerate the feed tracked updates for various events in various ways.

A. Which Events to generate a feed tracked update

In a database system, there are various events that can be detected.However, the operator of the database system and/or a tenant may notwant to detect every possible event as this could be costly with regardsto performance. Accordingly, the operator and/or the tenant canconfigure the database system to only detect certain events. Forexample, an update of a record may be an event that is to be detected.

Out of the events that are detected, a tenant (including a specific userof the tenant) may not want a feed tracked update about each detectedevent. For example, all updates to a record may be identified at a firstlevel. Then, based on specifications of an administrator and/or aspecific user of a tenant, another level of inquiry can be made as towhether a feed tracked update is to be generated about the detectedevent. For example, the events that qualify for a feed tracked updatecan be restricted to changes for only certain fields of the record, andcan differ depending on which user is receiving the feed. In oneimplementation, a database system can track whether an event qualifiesfor a feed tracked update for any user, and once the feed tracked updateis generated, it can be determined who is to receive the feed trackedupdate.

Supported events (events for which a feed tracked update is generated)can include actions for standard fields, custom fields, and standardrelated lists. Regarding standard fields, for the entity feed and theprofile feed, a standard field update can trigger a feed tracked updateto be presented in that feed. In one implementation, which standardfield can create a feed tracked update can be set by an administrator tobe the same for every user. In another implementation, a user can setwhich standard fields create a feed tracked update for that user's newsfeed. Custom fields can be treated the same or differently than standardfields.

The generation of a feed item can also depend on a relationship of anobject to other objects (e.g., parent-child relationships). For example,if a child object is updated, a feed tracked update may be written to afeed of a parent of the child object. The level of relationship can beconfigured, e.g., only 1 level of separation (i.e. nograndparent-grandchild relationship). Also, in one implementation, afeed tracked update is generated only for objects above the objectsbeing updated, i.e., a feed tracked update is not written for a childwhen the parent is updated.

In some implementations, for related lists of a record, a feed trackedupdate is written to its parent record (1 level only) when the relatedlist item is added, and not when the list item is changed or deleted.For example: user A added a new opportunity XYZ for account ABC. In thismanner, entity feeds can be controlled so as not to be cluttered withfeed tracked updates about changes to their related items. Any changesto the related list item can be tracked on their own entity feed, ifthat related list item has a feed on it. In this implementation, if auser wants to see a feed of the related list item then the user cansubscribe to it. Such a subscription might be when a user cares about aspecific opportunity related to a specific account. A user can alsobrowse to that object's entity feed. Other implementations can create afeed tracked update when a related entity is changed or deleted.

In one implementation, an administrator (of the system or of a specifictenant) can define which events of which related objects are to havefeed tracked updates written about them in a parent record. In anotherimplementation, a user can define which related object events to show.In one implementation, there are two types of related lists of relatedobjects: first class lookup and second class lookup. Each of the recordsin the related lists can have a different rule for whether a feedtracked update is generated for a parent record. Each of these relatedlists can be composed as custom related lists. In variousimplementations, a custom related list can be composed of custom datastructures; the lists can contain a variety of records or items (e.g.,not restricted to a particular type of record or item), and can bedisplayed in a customized manner.

In one implementation, a first class lookup contains records of a childrecord that can exist by itself. For example, the contacts on an accountexist as a separate record and also as a child record of the account. Inanother implementation, a record in a first class lookup can have itsown feed, which can be displayed on its detail page.

In one implementation, a second class lookup can have line itemsexisting only in the context of their parent record (e.g., activities onan opportunity, contact roles on opportunity/contact). In oneimplementation, the line items are not objects themselves, and thusthere is no detail page, and no place to put a feed. In anotherimplementation, a change in a second class lookup can be reported on thefeed of the parent.

Some implementations can also create feed tracked updates for dependentfield changes. A dependent field change is a field that changes valuewhen another field changes, and thus the field has a value that isdependent on the value of the other field. For example, a dependentfield might be a sum (or other formula) that totals values in otherfields, and thus the dependent field would change when one of the fieldsbeing summed changes. Accordingly, in one implementation, a change inone field could create feed tracked updates for multiple fields. Inother implementations, feed tracked updates are not created fordependent fields.

B. How the Feed Tracked Update is Generated

After it is determined that a feed tracked update is going to begenerated, some implementations can also determine how the feed trackedupdate is generated. In one implementation, different methods can beused for different events, e.g., in a similar fashion as for theconfigurability of which events feed tracked updates are generated. Afeed tracked update can also include a description of multiple events(e.g., john changed the account status and amount).

In one implementation, the feed tracked update is a grammaticalsentence, thereby being easily understandable by a person. In anotherimplementation, the feed tracked update provides detailed informationabout the update. In various examples, an old value and new value for afield may be included in the feed tracked update, an action for theupdate may be provided (e.g., submitted for approval), and the names ofparticular users that are responsible for replying or acting on the feedtracked update may be also provided. The feed tracked update can alsohave a level of importance based on settings chosen by theadministrator, a particular user requesting an update, or by a followinguser who is to receive the feed tracked update, which fields is updated,a percentage of the change in a field, the type of event, or anycombination of these factors.

The system may have a set of heuristics for creating a feed trackedupdate from the event (e.g., a request to update). For example, thesubject may be the user, the record, or a field being added or changed.The verb can be based on the action requested by the user, which can beselected from a list of verbs (which may be provided as defaults orinput by an administrator of a tenant). In one implementation, feedtracked updates can be generic containers with formatting restrictions,

As an example of a feed tracked update for a creation of a new record,“Mark Abramowitz created a new Opportunity for IBM—20,000 laptops withAmount as $3.5M and Sam Palmisano as Decision Maker.” This event can beposted to the profile feed for Mark Abramowitz and the entity feed forrecord of Opportunity for IBM—20,000 laptops. The pattern can be givenby (AgentFullName) created a new (ObjectName)(RecordName) with[(FieldName) as (FieldValue) [, / and]]*[[added/changed/removed](RelatedListRecordName) [as / to / as] (RelatedListRecordValue) [, /and]]*. Similar patterns can be formed for a changed field (standard orcustom) and an added child record to a related list.

VI. Tracking Commentary From Or About A User

Some implementations can also have a user submit text, instead of thedatabase system generating a feed tracked update. As the text issubmitted as part or all of a message by a user, the text can be aboutany topic. Thus, more information than just actions of a user and eventsof a record can be conveyed. In one implementation, the messages can beused to ask a question about a particular record, and users followingthe record can provide comments and responses.

FIG. 6 shows a flowchart of an example of a method 600 for creating anews feed from messages created by a user about a record or anotheruser, performed in accordance with some implementations. In oneimplementation, method 600 can be combined with methods 300 and 500. Inone aspect, a message can be associated with the first user when thefirst user creates the message (e.g., a post or comment about a recordor another user). In another aspect, a message can be associated withthe first user when the message is about the first user (e.g., posted byanother user on the first user's profile feed).

In block 610, the database system receives a message (e.g., a post orstatus update) associated with a first user. The message (e.g., a postor status update) can contain text and/or multimedia content submittedby another user or by the first user. In one implementation, a post isfor a section of the first user's profile page where any user can add apost, and where multiple posts can exist. Thus, a post can appear on thefirst user's profile page and can be viewed when the first user'sprofile is visited. For a message about a record, the post can appear ona detail page of a record. Note the message can appear in other feeds aswell. In another implementation, a status update about the first usercan only be added by the first user. In one implementation, a user canonly have one status message.

In block 620, the message is added to a table, as described in greaterdetail below. When the feed is opened, a query filters one or moretables to identify the first user, identify other persons that the useris following, and retrieve the message. Messages and record updates arepresented in a combined list as the feed. In this way, in oneimplementation, the message can be added to a profile feed of the firstuser, which is associated (e.g., as a related list) with the firstuser's profile. In one implementation, the posts are listedindefinitely. In another implementation, only the most recent posts(e.g., last 50) are kept in the profile feed. Such implementations canalso be employed with feed tracked updates. In yet anotherimplementation, the message can be added to a profile of the user addingthe message.

In block 630, the database system identifies followers of the firstuser. In one implementation, the database system can identify thefollowers as described above for method 500. In various implementations,a follower can select to follow a feed about the actions of the firstuser, messages about the first user, or both (potentially in a samefeed).

In block 640, the message is added to a news feed of each follower. Inone implementation, the message is only added to a news feed of aparticular follower if the message matches some criteria, e.g., themessage includes a particular keyword or other criteria. In anotherimplementation, a message can be deleted by the user who created themessage. In one implementation, once deleted by the author, the messageis deleted from all feeds to which the message had been added.

In block 650, the follower accesses a news feed and sees the message.For example, the follower can access a news feed on the follower's ownprofile page. As another example, the follower can have a news feed sentto his/her own desktop without having to first go to a home page.

In block 660, the database system receives a comment about the message.The database system can add the comment to a feed of the same firstuser, much as the original message was added. In one implementation, thecomment can also be added to a feed of a second user who added thecomment. In one implementation, users can also reply to the comment. Inanother implementation, users can add comments to a feed tracked update,and further comments can be associated with the feed tracked update. Inyet another implementation, making a comment or message is not an actionto which a feed tracked update is created. Thus, the message may be theonly feed item created from such an action.

In one implementation, if a feed tracked update or post is deleted, itscorresponding comments are deleted as well. In another implementation,new comments on a feed tracked update or post do not update the feedtracked update timestamp. Also, the feed tracked update or post cancontinue to be shown in a feed (profile feed, record feed, or news feed)if it has had a comment within a specified timeframe (e.g., within thelast week). Otherwise, the feed tracked update or post can be removed inan implementation.

In some implementations, all or most feed tracked updates can becommented on. In other implementations, feed tracked updates for certainrecords (e.g., cases or ideas) are not commentable. In variousimplementations, comments can be made for any one or more records ofopportunities, accounts, contacts, leads, and custom data structures.

In block 670, the comment is added to a news feed of each follower. Inone implementation, a user can make the comment within the user's newsfeed. Such a comment can propagate to the appropriate profile feed orrecord feed, and then to the news feeds of the following users. Thus,feeds can include what people are saying, as well as what they aredoing. In one aspect, feeds are a way to stay up-to-date (e.g., onusers, opportunities, etc.) as well as an opportunity to reach out toco-workers/partners and engage them around common goals.

In some implementations, users can rate feed tracked updates or messages(including comments). A user can choose to prioritize a display of afeed so that higher rated feed items show up higher on a display. Forexample, in an implementation where comments are answers to a specificquestion, users can rate the different status posts so that a bestanswer can be identified. As another example, users are able to quicklyidentify feed items that are most important as those feed items can bedisplayed at a top of a list. The order of the feed items can be basedon an importance level (which can be determined by the database systemusing various factors, some of which are mentioned herein) and based ona rating from users. In one implementation, the rating is on a scalethat includes at least 3 values. In another implementation, the ratingis based on a binary scale.

Besides a profile for a user, a group can also be created. In variousimplementations, the group can be created based on certain criteria thatare common to the users, can be created by inviting users, or can becreated by receiving requests to join from a user. In oneimplementation, a group feed can be created, with messages being addedto the group feed when someone adds a message to the group as a whole.For example, a group page may have a section for posts. In anotherimplementation, a message can be added to a group feed when a message isadded about any one of the members. In yet another implementation, agroup feed can include feed tracked updates about actions of the groupas a whole (e.g., when an administrator changes data in a group profileor a record owned by the group), or about actions of an individualmember.

FIG. 7 shows an example of a group feed on a group page according tosome implementations. As shown, a feed item 710 shows that a user hasposted a document to the group object. The text “Bill Bauer has postedthe document Competitive Insights” can be generated by the databasesystem in a similar manner as feed tracked updates about a record beingchanged. A feed item 720 shows a post to the group, along with comments730 from Ella Johnson, James Saxon, Mary Moore and Bill Bauer.

FIG. 8 shows an example of a record feed containing a feed trackedupdate, post, and comments according to some implementations. Feed item810 shows a feed tracked update based on the event of submitting adiscount for approval. Other feed items show posts, e.g., from BillBauer, that are made to the record and comments, e.g., from Erica Lawand Jake Rapp, that are made on the posts.

VII. Infrastructure For A Feed

A. Tables Used to Create a Feed

FIG. 9A shows an example of a plurality of tables that may be used intracking events and creating feeds according to some implementations.The tables of FIG. 9A may have entries added, or potentially removed, aspart of tracking events in the database from which feed items arecreated or that correspond to feed items. In one implementation, eachtenant has its own set of tables that are created based on criteriaprovided by the tenant.

An event hifeed tracked update table 910 can provide a hifeed trackedupdate of events from which feed items are created. In one aspect, theevents are for objects that are being tracked. Thus, table 910 can storeand change hifeed tracked updates for feeds, and the changes can bepersisted. In various implementations, event hifeed tracked update table910 can have columns of event ID 911, object ID 912 (also called parentID), and created by ID 913. The event ID 911 can uniquely identify aparticular event and can start at 1 (or other number or value).

Each new event can be added chronologically with a new event ID, whichmay be incremented in order. An object ID 912 can be used to track whichrecord or user's profile is being changed. For example, the object IDcan correspond to the record whose field is being changed or the userwhose feed is receiving a post. The created by ID 913 can track the userwho is performing the action that results in the event, e.g., the userthat is changing the field or that is posting a message to the profileof another user.

In some other implementations, event hifeed tracked update table 910 canhave one or more of the following variables with certain attributes:ORGANIZATION_ID being CHAR(15 BYTE), FEEDS_ENTITY_HIFEED TRACKEDUPDATE_ID being CHAR(15 BYTE), PARENT_ID being CHAR(15 BYTE), CREATED_BYbeing CHAR(15 BYTE), CREATED_DATE being a variable of type DATE,DIVISION being a NUMBER, KEY_PREFIX being CHAR(3 BYTE), and DELETEDbeing CHAR(1 BYTE). The parent ID can provide an ID of a parent objectin case the change is promulgated to the parent. The key prefix canprovide a key that is unique to a group of records, e.g., custom records(objects). The deleted variable can indicate that the feed items for theevent are deleted, and thus the feed items are not generated. In oneimplementation, the variables for each event entry or any entry in anyof the tables may not be nullable. In another implementation, allentries in the event hifeed tracked update table 910 are used to createfeed items for only one object, as specified by the object ID 912. Forexample, one feed tracked update cannot communicate updates on tworecords, such as updates of an account field and an opportunity field.

In one implementation, a name of an event can also be stored in table910. In one implementation, a tenant can specify events that they wanttracked. In an implementation, event hifeed tracked update table 910 caninclude the name of the field that changed (e.g., old and new values).In another implementation, the name of the field, and the values, arestored in a separate table. Other information about an event (e.g., textof comment, feed tracked update, post or status update) can be stored inevent hifeed tracked update table 910, or in other tables, as is nowdescribed.

A field change table 920 can provide a hifeed tracked update of thechanges to the fields. The columns of table 920 can include an event ID921 (which correlates to the event ID 911), an old value 922 for thefield, and the new value 923 for the field. In one implementation, if anevent changes more than one field value, then there can be an entry foreach field changed. As shown, event ID 921 has two entries for eventE37.

In some other implementations, field change table 920 can have one ormore of the following variables with certain attributes: ORGANIZATION_IDbeing CHAR(15 BYTE), FEEDS_ENTITY_HIFEED TRACKED UPDATE_FIELDS_ID beingCHAR(15 BYTE) and identifying each entry, FEEDS_ENTITY_HIFEED TRACKEDUPDATE_ID being CHAR(15 BYTE), FIELD_KEY being VARCHAR2(120 BYTE),DATA_TYPE being CHAR(1 BYTE), OLDVAL_STRING VARCHAR2 being (765 BYTE),NEWVAL_STRING being VARCHAR2(765 BYTE), OLDVAL_FIRST_NAME beingVARCHAR2(765 BYTE), NEWVAL_FIRST_NAME being VARCHAR2(765 BYTE),OLDVAL_LAST_NAME being VARCHAR2(765 BYTE), NEWVAL_LAST_NAME beingVARCHAR2(765 BYTE), OLDVAL_NUMBER being NUMBER, NEWVAL_NUMBER beingNUMBER, OLDVAL_DATE being DATE, NEWVAL_DATE being DATE, and DELETEDbeing CHAR(1 BYTE). In one implementation, one or more of the variablesfor each entry in any of the tables may be nullable.

In one implementation, the data type variable (and/or other variables)is a non-API-insertable field. In another implementation, variablevalues can be derived from the record whose field is being changed.Certain values can be transferred into typed columns old/new valuestring, old/new value number or old/new value date depending upon thederived values. In another implementation, there can exist a data typefor capturing add/deletes for child objects. The child ID can be trackedin the foreign-key column of the record. In yet another implementation,if the field name is pointing to a field in the parent entity, a fieldlevel security (FLS) can be used when a user attempts to a view arelevant feed item. Herein, security levels for objects and fields arealso called access checks and determinations of authorization. In oneaspect, the access can be for create, read, write, update, or delete ofobjects.

In one implementation, the field name (or key) can be either a fieldname of the entity or one of the values in a separate list. For example,changes that do not involve the update of an existing field (e.g., aclose or open) can have a field name specified in an enumerated list.This enumerated list can store “special” field name sentinel values fornon-update actions that a tenant wants to track. In one aspect, the APIjust surfaces these values and the caller has to check the enumeratedvalues to see if it is a special field name.

A comment table 930 can provide a hifeed tracked update of the commentsmade regarding an event, e.g., a comment on a post or a change of afield value. The columns of table 930 can include an event ID 921 (whichcorrelates to the event ID 911), the comment column 932 that stores thetext of the comment, and the time/date 933 of the comment. In oneimplementation, there can be multiple comments for each event. As shown,event ID 921 has two entries for event E37.

In some other implementations, comment table 930 can have one or more ofthe following variables with certain attributes: ORGANIZATION_ID beingCHAR(15 BYTE), FEEDS_COMMENTS_ID being CHAR(15 BYTE) and uniquelyidentifying each comment, PARENT_ID being CHAR(15 BYTE), CREATED_BYbeing CHAR(15 BYTE), CREATED_DATE being DATE, COMMENTS beingVARCHAR2(420 BYTE), and DELETED being CHAR(1 BYTE).

A user subscription table 940 can provide a list of the objects beingfollowed (subscribed to) by a user. In one implementation, each entryhas a user ID 941 of the user doing the following and one object ID 942corresponding to the object being followed. In one implementation, theobject being followed can be a record or a user. As shown, the user withID U819 is following object IDs O615 and O489. If user U819 is followingother objects, then additional entries may exist for user U819. Also asshown, user U719 is also following object O615. The user subscriptiontable 940 can be updated when a user adds or deletes an object that isbeing followed.

In some other implementations, user subscription table 940 can becomposed of two tables (one for records being followed and one for usersbeing followed). One table can have one or more of the followingvariables with certain attributes: ORGANIZATION_ID being CHAR(15 BYTE),ENTITY_SUBSCRIPTION_ID being CHAR(15 BYTE), PARENT_ID being CHAR(15BYTE), CREATED_BY being CHAR(15 BYTE), CREATED_DATE being DATE, andDELETED being CHAR(1 BYTE). Another table can have one or more of thefollowing variables with certain attributes: ORGANIZATION_ID beingCHAR(15 BYTE), USER_SUBSCRIPTIONS_ID being CHAR(15 BYTE), USER_ID beingCHAR(15 BYTE), CREATED_BY being CHAR(15 BYTE), and CREATED_DATE beingDATE.

In one implementation, regarding a profile feed and a news feed, theseare read-only views on the event hifeed tracked update table 910specialized for these feed types. Conceptually the news feed can be asemi-join between the entity subscriptions table 940 and the eventhifeed tracked update table 910 on the object IDs 912 and 942 for theuser. In one aspect, these entities can have polymorphic parents and canbe subject to a number of restrictions detailed herein, e.g., to limitthe cost of sharing checks.

In one implementation, entity feeds are modeled in the API as a feedassociate entity (e.g., AccountFeed, CaseFeed, etc). A feed associateentity includes information composed of events (e.g., event IDs) foronly one particular record type. Such a list can limit the query (andsharing checks) to a specific record type. In one aspect, thisstructuring of the entity feeds can make the query run faster. Forexample, a request for a feed of a particular account can include therecord type of account. In one implementation, an account feed table canthen be searched, where the table has account record IDs andcorresponding event IDs or pointers to particular event entries in eventhifeed tracked update table 910. Since the account feed table onlycontains some of the records (not all), the query can run faster.

In one implementation, there may be objects with no events listed in theevent hifeed tracked update table 910, even though the record is beingtracked. In this case, the database service can return a resultindicating that no feed items exist.

In another implementation, tables can also exist for audit tracking,e.g., to examine that operations of the system (e.g., access checks) areperforming accurately. In one implementation, audit change-hifeedtracked update tables can be persisted (e.g., in bulk) synchronously inthe same transaction as feed events are added to event hifeed trackedupdate table 910. In another implementation, entries to the two sets oftable can be persisted in asynchronous manner (e.g., by forking a bulkupdate into a separate java thread). In one aspect, some updates to anyof the tables can get lost if the instance of the table goes down whilethe update has not yet finished. This asynchronous manner can limit animpact performance on save operations. In some implementations, a field“persistence type” (tri state: AUDIT, FEEDS or BOTH) can be added tocapture user preferences, as opposed to being hard coded.

B. Feed Item

A feed item can represent an individual field change of a record,creation and deletion of a record, or other events being tracked for arecord or a user. In one implementation, all of the feed items in asingle transaction (event) can be grouped together and have the sameevent ID. A single transaction relates to the operations that can beperformed in a single communication with the database. In anotherimplementation where a feed is an object of the database, a feed itemcan be a child of a profile feed, news feed, or entity feed. If a feeditem is added to multiple feeds, the feed item can be replicated as achild of each feed to which the feed item is added.

In one implementation, a feed item is visible only when its parent feedis visible, which can be the same as needing read access on the feed'sparent (which can be by the type of record or by a specific record). Thefeed item's field may be only visible when allowed under field-levelsecurity (FLS). Unfortunately, this can mean that the parent feed may bevisible, but the child may not be because of FLS. Such access rules aredescribed in more detail below. In one implementation, a feed item canbe read-only. In this implementation, after being created, the feed itemcannot be changed.

In multi-currency organizations, a feed item can have an extra currencycode field. This field can give the currency code for the currency valuein this field. In one aspect, the value is undefined when the data typeis anything other than currency.

C. Feed Comment

In some implementations, a comment exists as an item that depends fromfeed tracked updates, posts, status updates, and other items that areindependent of each other. Thus, a feed comment object can exist as achild object of a feed item object. For example, comment table 930 canbe considered a child table of event hifeed tracked update table 910. Inone implementation, a feed comment can be a child of a profile feed,news feed, or entity feed that is separate from other feed items.

In various implementations, a feed comment can have various permissionsfor the following actions. For read permission, a feed comment can bevisible if the parent feed is visible. For create permission, if a userhas access to the feed (which can be tracked by the ID of the parentfeed), the user can add a comment. For delete, only a user with modifyall data permission or a user who added the comment can delete thecomment. Also delete permission can require access on the parent feed.An update of a comment can be restricted, and thus not be allowed. Inone implementation, regarding a query restriction, a feed comment cannotbe queried directly, but can be queried only via the parent feed. Anexample is “select id, parentid, (select . . . from feedcomment) fromentityfeed”. In another implementation, a feed comment can be directlyqueries, e.g., by querying comment table 930. A query could include thetext of a comment or any other column of the table.

In another implementation, regarding soft delete behavior, a feedcomment table does not have a soft delete column. A soft delete allowsan undelete action. In one implementation, a record can have a softdelete. Thus, when the record is deleted, the feed (and its children)can be soft deleted. Therefore, in one aspect, a feed comment cannot beretrieved via the “query” verb (which would retrieve only the comment),but can be retrieved via “queryAll” verb though. An example isqueryAll(“select id, (select id, commentbody from feedcomments) fromaccountfeed where parentid=‘001x000xxx3MkADAA0’”); // where‘001x000xxx3MkADAA0’has been soft deleted. When a hard delete (aphysical delete) happens, the comment can be hard deleted from thedatabase.

In one implementation, regarding an implicit delete, feeds with commentsare not deleted by a reaper (a routine that performs deletion). Inanother implementation, a user cannot delete a feed. In yet anotherimplementation, upon lead convert (e.g., to an opportunity or contact),the feed items of the lead can be hard deleted. This implementation canbe configured to perform such a deletion for any change in record type.In various implementations, only the comments are hard deleted upon alead convert, other convert, or when the object is deleted (as mentionedabove).

In one implementation, viewing a feed pulls up the most recent messagesor feed tracked updates (e.g., 25) and searches the most recent (e.g.,4) comments for each feed item. The comments can be identified via thecomment table 930. In one implementation, a user can request to see morecomments, e.g., by selecting a see more link.

In some implementations, user feeds and/or entity feeds have a lastcomment date field. In various implementations, the last comment datefield is stored as a field of a record or a user profile. For feeds withno comments, this can be the same as the created date. Whenever a newcomment is created, the associated feed's last comment date can beupdated with the created date of the comment. The last comment date isunchanged if a feed comment is deleted. A use case is to allow people toorder their queries to see the feeds, which have been most recentlycommented on.

D. Creating custom feeds by customizing the event hifeed tracked updatetable

In some implementations, a tenant (e.g., through an administrator) or aspecific user of a tenant can specify the types of events for which feeditems are created. A user can add more events or remove events from alist of events that get added to the event hifeed tracked update table910. In one implementation, a trigger can be added as a piece of code,rule, or item on a list for adding a custom event to the event hifeedtracked update table 910. These custom events can provide customers theability to create their own custom feeds and custom feed items toaugment or replace implicitly generated feeds via event hifeed trackedupdate table 910. Implicitly generated feed data can be created whenfeed-tracking is enabled for certain entities/field-names. In oneimplementation, in order to override implicit feeds, feed tracking canbe turned off and then triggers can be defined by the user to add eventsto the event hifeed tracked update table 910. In other implementations,users are not allowed to override the default list of events that areadded to table 910, and thus cannot define their own triggers for havingevents tracked.

For example, upon lead convert or case close, a default action to betaken by the system may be to add multiple events to event hifeedtracked update table 910. If a customer (e.g., a tenant or a specificuser) does not want each of these events to show up as feed items, thecustomer can turn off tracking for the entities and generate customfeeds by defining customized triggers (e.g., by using an API) upon theevents. As another example, although data is not changed, a customer maystill want to track an action on a record (e.g., status changes if notalready being tracked, views by certain people, retrieval of data,etc.).

In one implementation, if a user does not want a feed item to begenerated upon every change on a given field, but only if the changeexceeds a certain threshold or range, then such custom feeds can beconditionally generated with the customized triggers. In oneimplementation, the default tracking for the record or user may beturned off for this customization so that the events are onlyconditionally tracked. In another implementation, a trigger can bedefined that deletes events that are not desired, so that defaulttracking can still be turned on for a particular object type. Suchconditional tracking can be used for other events as well.

In some implementations, defining triggers to track certain events canbe done as follows. A user can define an object type to track. Thisobject type can be added to a list of objects that can be tracked for aparticular tenant. The tenant can remove object types from this list aswell. Custom data structures and standard objects can be on the list,which may, for example, be stored in cache or RAM of a server or in thedatabase. Generally only one such list exists for a tenant, and users donot have individual lists for themselves, although in someimplementations, they may particularly when the number of users in atenant is small.

In one implementation, a tenant can select which records of an objecttype are to be tracked. In another implementation, once an object typeis added to the tracking list of object types, then all records of thattype are tracked. The tenant can then specify the particulars of how thetracking is to be performed. For example, the tenant can specifytriggers as described above, fields to be tracked, or any of thecustomizations mentioned herein.

In some implementations, when a feed is defined as an object in thedatabase (e.g., as a child object of entity records that can betracked), a particular instance of the feed object (e.g., for aparticular record) can be create-able and delete-able. In oneimplementation, if a user has access to a record then the user cancustomize the feed for the record. In one implementation, a record maybe locked to prevent customization of its feed.

One method of creating a custom feed for users of a database systemaccording to implementations is now described. Any of the followingblocks can be performed wholly or partially with the database system,and in particular by one or more processor of the database system.

In block A, one or more criteria specifying which events are to betracked for possible inclusion into a feed to be displayed are receivedfrom a tenant. In block B, data indicative of an event is received. Inblock C, the event is analyzed to determine if the criteria aresatisfied. In block D, if the criteria are satisfied, at least a portionof the data is added to a table (e.g., one or more of the tables in FIG.9A) that tracks events for inclusion into at least one feed for a userof the tenant. The feed in which feed items of an event may ultimatelybe displayed can be a news feed, record feed, or a profile feed.

E. Creating custom feeds with filtering

After feed items have been generated, they can be filtered so that onlycertain feed items are displayed, which may be tailored to a specifictenant and/or user. In one implementation, a user can specify changes toa field that meet certain criteria for the feed item to show up in afeed displayed to the user, e.g., a news feed or even an entity feeddisplayed directly to the user. In one implementation, the criteria canbe combined with other factors (e.g., number of feed items in the feed)to determine which feed items to display. For instance, if a smallnumber of feed items exist (e.g., below a threshold), then all of thefeed items may be displayed.

In one implementation, a user can specify the criteria via a query onthe feed items in his/her new feed, and thus a feed may only returnobjects of a certain type, certain types of events, feed tracked updatesabout certain fields, and other criteria mentioned herein. Messages canalso be filtered according to some criteria, which may be specified in aquery. Such an added query can be added onto a standard query that isused to create the news feed for a user. A first user could specify theusers and records that the first user is following in this manner, aswell as identify the specific feed items that the first user wants tofollow. The query could be created through a graphical interface oradded by a user directly in a query language. Other criteria couldinclude receiving only posts directed to a particular user or record, asopposed to other feed items.

In one implementation, the filters can be run by defining code triggers,which run when an event, specific or otherwise, occurs. The triggercould then run to perform the filtering at the time the event occurs orwhen a user (who has certain defined triggers, that is configured for aparticular user) requests a display of the feed. A trigger could searchfor certain terms (e.g., vulgar language) and then remove such terms ornot create the feed item. A trigger can also be used to send the feeditem to a particular person (e.g., an administrator) who does notnormally receive the feed item were it not for the feed item containingthe flagged terms.

F. Access Checks

In one implementation, a user can access a feed of a record if the usercan access the record. The security rules for determining whether a userhas access to a record can be performed in a variety of ways, some ofwhich are described in commonly assigned U.S. Pat. No. 8,095,531, titledMETHODS AND SYSTEMS FOR CONTROLLING ACCESS TO CUSTOM OBJECTS IN ADATABASE, by Weissman et al., issued on Jan. 10, 2012, and herebyincorporated by reference in its entirety and for all purposes. Forexample, a security level table can specify whether a user can see aparticular type of record and/or particular records. In oneimplementation, a hierarchy of positions within a tenant is used. Forexample, a manager can inherit the access levels of employees that themanager supervises. Field level security (FLS) can also be used todetermine whether a particular feed tracked update about an update to afield can be seen by the user. The field change table 920 can be used toidentify a field name or field ID, and then whether the user has readaccess to that field can be determined from an FLS table. For example,if a user could not see a field of a social security number, the feed ofthe user provided to the user would not include any feed items relatedto the social security number field.

In one implementation, a user can edit a feed of a record if the userhas access to the record, e.g., deleting or editing a feed item. Inanother implementation, a user (besides an administrator) cannot edit afeed item, except for performing an action from which a feed item can becreated. In one implementation, a user is required to have access to aparticular record and field for a feed item to be created based on anaction of the user. In this case, an administrator can be considered tobe a user with MODIFY-ALL-DATA security level. In yet anotherimplementation, a user who created the record can edit the feed.

G. Posts

In one implementation, the text of posts are stored in a child table(post table 950), which can be cross-referenced with event hifeedtracked update table 910. Post table 950 can include event ID 951 (tocross-reference with event ID 911), post text 952 to store the text ofthe post, and time/date 953. An entry in post table 950 can beconsidered a feed post object. Posts for a record can also be subject toaccess checks. In one implementation, if a user can view a record thenall of the posts can be seen, i.e. there is not an additional level ofsecurity check as there is for FLS. In another implementation, anadditional security check could be done, e.g., by checking on whethercertain keywords (or phrases) exist in the post. For instance, a postmay not be not provided to specified users if a certain keyword exists,or only provided to specified users if a keyword exists. In anotherimplementation, a table can exist for status updates.

VIII. Subscribing To Users And Records To Follow

As described above, a user can follow users, groups, and records.Implementations can provide mechanisms for a user to manage which users,groups, and records that the user is currently following. In oneimplementation, a user can be limited to the number of users and records(collectively or separately) that the user can follow. For example, auser may be restricted to only following 10 users and 15 records, or asanother example, 25 total. Alternatively, the user may be permitted tofollow more or less users.

In one implementation, a user can go to a page of a record and thenselect to follow that object (e.g., with a button marked “follow” or“join”). In another implementation, a user can search for a record andhave the matching records show up in a list. The search can includecriteria of records that the user might want to follow. Such criteriacan include the owner, the creation date, last comment date, andnumerical values of particular fields (e.g., an opportunity with a valueof more than $10,000).

A follow button (or other activation object) can then reside next toeach record in the resulting list, and the follow button can be selectedto start following the record. Similarly, a user can go to a profilepage of a user and select to follow the user, or a search for users canprovide a list, where one or more users can be selected for followingfrom the list. The selections of subscribing and unsubscribing can addand delete rows in table 920.

In some implementations, a subscription center acts as a centralizedplace in a database application (e.g., application platform 18) tomanage which records a user subscribes to, and which field updates theuser wants to see in feed tracked updates. The subscription center canuse a subscription table to keep track of the subscriptions of varioususers. In one implementation, the subscription center shows a list ofall the items (users and records) a user is subscribed to. In anotherimplementation, a user can unsubscribe to subscribed objects from thesubscription center.

A. Automatic Subscription

In one implementation, an automatic subscription feature can ensure thata user is receiving certain feeds. In this manner, a user does not haveto actively select certain objects to follow. Also, a tenant can ensurethat a user is following objects that the user needs to be following.

In various implementations for automatically following users, a defaultfor small organizations can be to follow everyone. For bigorganizations, the default can be to follow a manager and peers. If auser is a manager, the default can be to follow the manager'ssupervisor, peers, and people that the manager supervises(subordinates). In other implementations for automatically followingrecords, records that the user owns may be automatically followed and/orrecords recently viewed (or changed) may be automatically followed.

In one example, a new record is created. The owner (not necessarily theuser who created the entity) is subscribed to the entity. If ownershipis changed, the new owner may automatically be subscribed to follow theentity. Also, after a lead convert, the user doing the lead convert maybe automatically subscribed to the new account, opportunity, or contactresulting from the lead convert. In one implementation, the autosubscription is controlled by user preference. That is a user or tenantcan have the auto subscribe feature enabled or not. In one aspect, thedefault is to have the auto-subscribe turned on.

FIG. 9B shows a flowchart of an example of a method 900 forautomatically subscribing a user to an object in a database system,performed in accordance with some implementations. Any of the followingblocks can be performed wholly or partially with the database system,and in particular by one or more processor of the database system.

In block 901, one or more properties of an object stored in the databasesystem are received. The properties can be received from administratorsof the database system, or from users of the database system (which maybe an administrator of a customer organization). The properties can berecords or users, and can include any of the fields of the object thatare stored in the database system. Examples of properties of a recordinclude: an owner of the record, a user that converted the record fromone record type to another record type, whether the first user hasviewed the record, and a time the first user viewed the record. Examplesof properties of a user include: which organization (tenant) the user isassociated with, the second user's position in the same organization,and which other users the user had e-mailed or worked with on projects.

In block 902, the database system receives one or more criteria aboutwhich users are to automatically follow the object. The criteria can bereceived from administrators of the database system, or from one or moreusers of the database system. The users may be an administrator of acustomer organization, which can set tenant-wide criteria or criteriafor specific users (who may also set the criteria themselves). Examplesof the criteria can include: an owner or creator of a record is tofollow the record, subordinates of an owner or creator of a record areto follow the record, a user is to follow records recently viewed(potentially after a specific number of views), records that a user haschanged values (potentially with a date requirement), records created byothers in a same business group as the user. Examples of the criteriacan also include: a user is to follow his/her manager, the user's peers,other users in the same business group as the user, and other users thatthe user has e-mailed or worked with on a project. The criteria can bespecific to a user or group of users (e.g., users of a tenant).

In block 903, the database system determines whether the one or moreproperties of the object satisfy the one or more criteria for a firstuser. In one implementation, this determination can occur by firstobtaining the criteria and then determining objects that satisfy thecriteria. The determination can occur periodically, at time of creationof an object, or at other times. If different users have differentcriteria, then the criteria for a particular user or group could besearched at the same time. Since users of different tenants normallycannot view objects of another tenant, certain criteria does not have tobe checked. In another implementation, this determination can occur bylooking at certain properties and then identifying any criteria that aremet. In yet another implementation, the criteria and properties can beused to find users that satisfy the criteria.

In block 904, if the criteria are satisfied, the object is associatedwith the first user. The association can be in a list that storesinformation as to what objects are being followed by the first user.User subscription table 940 is an example of such a list. In oneimplementation, the one or more criteria are satisfied if one propertysatisfies at least one criterion. Thus, if the criteria are that a userfollows his/her manager and the object is the user's manager, then thefirst user will follow the object.

In one implementation, a user can also be automatically unsubscribed,e.g., if a certain action happens. The action could be a change in theuser's position within the organization, e.g., a demotion or becoming acontractor. As another example, if a case gets closed, then usersfollowing the case may be automatically unsubscribed.

B. Feed and Subscription API

In one implementation, a feed and subscription center API can enabletenants to provide mechanisms for tracking and creating feed items,e.g., as described above for creating custom feeds by allowing users toadd custom events for tracking. For example, after some initial feeditems are created (e.g., by administrators of the database system),outside groups (e.g., tenants or software providers selling software tothe tenants) can ‘enable objects’ for feeds through a standard API. Thegroups can then integrate into the subscription center and the feedtracked update feeds on their own. In one implementation, the feed andsubscription center API can use a graphical user interface implementedfor the default feed tracking. In one implementation, API examplesinclude subscribing to an entity by creating a new entity subscriptionobject for a particular user ID, or for all users of a tenant (e.g.,user subscription table 940). In one implementation, obtaining allsubscriptions for a given user can be performed by using a query, suchas “select . . . from EntitySubscription where userid=‘ . . . ’”.

Some implementations have restriction on non-admin users, e.g., thosewithout view all data permissions (VAD). One restriction can be a limitclause on entity subscription queries (e.g., queries on usersubscription table 940), e.g., where the limit of the number ofoperations is less than 100. In one implementation, users are notrequired to specify an order-by, but if an order-by is specified theycan only order on fields on the entity subscription entity. In oneimplementation, filters on entity subscription can likewise only specifyfields on the entity subscription entity. In one aspect, the object IDbeing followed can be sorted or filtered, but not the object name.

In one implementation, one or more restrictions can also be placed onthe identification of feed items in a feed that a user can access. Forexample, if a low-level user (i.e. user can access few objects) isattempting to see a profile feed of a high level user, a maximum numberof checks (e.g., 500) for access rights may be allowed. Such arestriction can minimize a cost of a feed request. In someimplementations, there are restriction on the type of queries (e.g.,fields for filtering) allowed to construct on feeds (e.g., on tables inFIG. 9A).

C. Sharing

As mentioned above, users may be restricted from seeing records fromother tenants, as well as certain records from the tenant to which theuser belongs (e.g., the user's employer). Sharing rules can refer to theaccess rules that restrict a user from seeing records that the user isnot authorized to see or access. Additionally, in one implementation, auser may be restricted to only seeing certain fields of a record,field-level security (FLS).

In an implementation, access rule checks are done upon subscription. Forexample, a user is not allowed to subscribe to a record or type ofrecord that the user cannot access. In one aspect, this can minimize(but not necessarily eliminate) cases where a user subscribes toentities they cannot access. Such cases can slow down news feed queries,when an access check is performed (which can end up removing much of thefeed items). Thus, a minimization of access checks can speed upoperation. In another implementation, when feed items are createddynamically, access rule checks may be done dynamically at the time ofsubsequent access, and not upon subscription or in addition to at timeof subscription.

An example case where access checks are still performed is when a firstuser follows a second user, but the second user performs some actions onrecords or is following records that the first user is not allowed tosee. The first user may be allowed to follow the second user, and thusthe subscription is valid even though the first user may not be able tosee all of the feed items. Before a feed tracked update is provided to anews feed of the first user, a security check may be performed tovalidate whether the first user has access rights to the feed item. Ifnot, the feed item is not displayed to the first user. In oneimplementation, users can be blocked from feed items that containcertain terms, symbols, account numbers, etc. In one implementation, anyuser can follow another user. In another implementation, users may berestricted as to which users, objects, and/or records he/she can follow.

Regarding viewing privileges of a feed, in one implementation, a usercan always see all of his own subscriptions (even if he's lost readaccess to a record). For example, a user can become a contractor, andthen the user may lose access to some records. But, the user may stillsee that he/she is following the object. This can help if there is alimit to the number of objects that can be followed. To unsubscribe auser may need to know what they are following so they can unsubscribeand subscribe to objects the user can see. In another implementation,for access to other people's subscriptions, a user can be required toneed read-access on the record-id to see the subscription. In someimplementations, users with authorization to modify all data cancreate/delete any subscription. In other implementations, a user cancreate/delete subscriptions only for that user, and not anyone else.

D. Configuration of which field to follow

There can be various feed settings for which feed items get added toprofile and record feeds, and which get added to news feeds. In oneimplementation, for profile feeds and entity feeds, feed tracked updatescan be written for all standard and custom fields on the supportedobjects. In one implementation, feed settings can be set to limit howmany and which fields of a record are tracked for determining whether afeed tracked update is to be generated. For example, a user oradministrator can choose specific fields to track and/or certain onesnot to track. In another implementation, there is a separate limit forthe number of trackable fields (e.g., 20) for a record. Thus, onlycertain changes may be tracked in an entity hifeed tracked update andshow up in the feed. In yet another implementation, default fields maybe chosen for tracking, where the defaults can be exposed in thesubscriptions center.

IX. Adding Items To A Feed

As described above, a feed includes feed items, which include feedtracked updates and messages, as defined herein. Various feeds can begenerated. For example, a feed can be generated about a record or abouta user. Then, users can view these feeds. A user can separately view afeed of a record or user, e.g., by going to a home page for the user orthe record. As described above, a user can also follow another user orrecord and receive the feed items of those feeds through a separate feedapplication (e.g., in a page or window), which is termed “chatter” incertain examples. The feed application can provide each of the feedsthat a user is following and, in some examples, can combine variousfeeds in a single information feed.

A feed generator can refer to any software program running on aprocessor or a dedicated processor (or combination thereof) that cangenerate feed items (e.g., feed tracked updates or messages) and combinethem into a feed. In one implementation, the feed generator can generatea feed item by receiving a feed tracked update or message, identifyingwhat feeds the item should be added to, and adding the feed. Adding thefeed can include adding additional information (metadata) to the feedtracked update or message (e.g., adding a document, sender of message, adetermined importance, etc.). The feed generator can also check to makesure that no one sees feed tracked updates for data that they don't haveaccess to see (e.g., according to sharing rules). A feed generator canrun at various times to pre-compute feeds or to compute themdynamically, or combinations thereof.

In one implementation, the feed generator can de-dupe events (i.e.prevent duplicates) that may come in from numerous records (and users).For example, since a feed tracked update can be published to multiplefeeds (e.g., John Choe changed the Starbucks Account Status) and aperson can be subscribed to both the Starbucks account and John Choe,implementations can filter out duplicates before adding or displayingthe items in a news feed. Thus, the Feed Generator can collapse eventswith multiple records and users for a single transaction into a singlefeed tracked update and ensure the right number of feed tracked updatesfor the particular feed. In some implementations, an action by a userdoes not create a feed item for that user (e.g., for a profile feed ofthat user), and it is only the feed of the object being acted upon(e.g., updated) for which a feed item is created. Thus, there should notbe duplicates. For example, if someone updates the status of a record,the feed item is only for the record and not the user.

In one implementation, processor 417 in FIG. 4 can identify an eventthat meets criteria for a feed tracked update, and then generate thefeed tracked update. Processor 417 can also identify a message. Forexample, an application interface can have certain mechanisms forsubmitting a message (e.g., “submit” buttons on a profile page, detailpage of a record, “comment” button on post), and use of these mechanismscan be used to identify a message to be added to a table used to createa feed or added directly to a list of feed items ready for display.

A. Adding Items to a Pre-Computed Feed

In some implementations, a feed of feed items is created before a userrequests the feed. Such an implementation can run fast, but have highoverall costs for storage. In one implementation, once a profile feed ora record feed has been created, a feed item (messages and feed trackedupdates) can be added to the feed. The feed can exist in the databasesystem in a variety of ways, such as a related list. The feed caninclude mechanisms to remove items as well as add them.

As described above, a news feed can be an aggregated feed of all therecord feeds and profile feeds to which a user has subscribed. The newsfeed can be provided on the home page of the subscribing user.Therefore, a news feed can be created by and exist for a particularuser. For example, a user can subscribe to receive entity feeds ofcertain records that are of interest to the user, and to receive profilefeeds of people that are of interest (e.g., people on a same team, thatwork for the user, are a boss of the user, etc.). A news feed can tell auser about all the actions across all the records (and people) whom haveexplicitly (or implicitly) been subscribed to via the subscriptionscenter (described above).

In one implementation, only one instance of each feed tracked update isshown on a user's news feed, even if the feed tracked update ispublished in multiple entities to which the user is subscribed. In oneaspect, there may be delays in publishing news articles. For example,the delay may be due to queued up messages for asynchronous entityhifeed tracked update persistence. Different feeds may have differentdelays (e.g., delay for new feeds, but none of profile and entityfeeds). In another implementation, certain feed tracked updatesregarding a subscribed profile feed or an entity feed are not shownbecause the user is not allowed access, e.g., due to sharing rules(which restrict which users can see which data). Also, in oneimplementation, data of the record that has been updated (which includescreation) can be provided in the feed (e.g., a file or updated value ofa feed can be added as a flash rendition).

Examples are provided below as how it can be determined which feed itemsto add to which news feeds. In one implementation, the addition of itemsto a news feed is driven by the following user. For example, the user'sprofile can be checked to determine objects the user is following, andthe database may be queried to determine updates to these objects. Inanother implementation, the users and records being followed drive theaddition of items to a news feed. Implementations can also combine theseand other aspects. In one implementation, a database system can befollower-driven if the number of subscriptions (users and records theuser is following) is small. For example, since the number subscriptionsare small, then changes to a small number of objects need to be checkedfor the follower.

Regarding implementations that are follower-driven, one implementationcan have a routine run for a particular user. The routine knows theusers and records that the user is following. The routine can poll thedatabase system for new feed tracked updates and messages about theusers and records that are being followed. In one implementation, thepolling can be implemented as queries. In one implementation, theroutine can run at least partially (even wholly) on a user device.

Regarding implementations where a news feed is driven by the record (oruser) being followed, processor 417 can identify followers of the recordafter a feed item is added to the record feed. Processor 417 canretrieve a list of the followers from the database system. The list canbe associated with the record, and can be stored as a related list orother object that is a field or child of the record.

In one implementation, profile and record feeds can be updatedimmediately with a new feed item after an action is taken or an eventoccurs. A news feed can also be updated immediately. In anotherimplementation, a news feed can be updated in batch jobs, which can runat periodic times.

B. Dynamically Generating Feeds

In some implementations, a feed generator can generate the feed itemsdynamically when a user requests to see a particular feed, e.g., aprofile feed, entity feed, or the user's news feed. In oneimplementation, the most recent feed items (e.g., top 50) are generatedfirst. In one aspect, the other feed items can be generated as abackground process, e.g., not synchronously with the request to view thefeed. However, since the background process is likely to complete beforea user gets to the next 50 feed items, the feed generation may appearsynchronous. In another aspect, the most recent feed items may or maynot include comments, e.g., that are tied to feed tracked updates orposts.

In one implementation, the feed generator can query the appropriatesubset of tables shown in FIG. 9A and/or other tables as necessary, togenerate the feed items for display. For example, the feed generator canquery the event hifeed tracked update table 910 for the updates thatoccurred for a particular record. The ID of the particular record can bematched against the ID of the record. In one implementation, changes toa whole set of records can be stored in one table. The feed generatorcan also query for status updates, posts, and comments, each of whichcan be stored in different parts of a record or in separate tables, asshown in FIG. 9A. What gets recorded in the entity hifeed tracked updatetable (as well as what is displayed) can be controlled by a feedsettings page in setup, which can be configurable by an administratorand can be the same for the entire organization, as is described abovefor custom feeds.

In one implementation, there can be two feed generators. For example,one generator can generate the record and profile feeds and anothergenerator can generate news feeds. For the former, the feed generatorcan query identifiers of the record or the user profile. For the latter,the news feed generator can query the subscribed profile feeds andrecord feeds, e.g., user subscription table 940. In one implementation,the feed generator looks at a person's subscription center to decidewhich feeds to query for and return a list of feed items for the user.The list can be de-duped, e.g., by looking at the event number andvalues for the respective table, such as field name or ID, comment ID,or other information.

C. Adding Information to feed hifeed tracked update tables

FIG. 10 shows a flowchart of an example of a method 1000 for savinginformation to feed tracking tables, performed in accordance with someimplementations. In one implementation, some of the blocks may beperformed regardless of whether a specific event or part of an event(e.g., only one field of an update is being tracked) is being tracked.In various implementations, a processor or set of processors (hardwiredor programmed) can perform method 1000 and any other method describedherein.

In block 1010, data indicative of an event is received. The data mayhave a particular identifier that specifies the event. For example,there may be a particular identifier for a field update. In anotherimplementation, the transaction may be investigated for keywordsidentifying the event (e.g., terms in a query indicating a close, changefield, or create operations).

In block 1020, it is determined whether the event is being tracked forinclusion into feed tables. The determination of what is being trackedcan be based on a tenant's configuration as described above. In oneaspect, the event has an actor (person performing an event), and anobject of the event (e.g., record or user profile being changed).

In block 1030, the event is written to an event hifeed tracked updatetable (e.g., table 910). In one implementation, this feed trackingoperation can be performed in the same transaction that performs a saveoperation for updating a record. In another implementation, atransaction includes at least two roundtrip database operations, withone roundtrip being the database save (write), and the second databaseoperation being the saving of the update in the hifeed tracked updatetable. In one implementation, the event hifeed tracked update table ischronological. In another implementation, if user A posts on user B'sprofile, then user A is under the “created by” 913 and user B is underthe object ID 912.

In block 1040, a field change table (e.g., field change table 920) canbe updated with an entry having the event identifier and fields thatwere changed in the update. In one implementation, the field changetable is a child table of the event hifeed tracked update table. Thistable can include information about each of the fields that are changed.For example, for an event that changes the name and balance for anaccount record, an entry can have the event identifier, the old and newname, and the old and new balance. Alternatively, each field change canbe in a different row with the same event identifier. The field name orID can also be included to determine which field the values areassociated.

In block 1050, when the event is a post, a post table (e.g., post table950) can be updated with an entry having the event identifier and textof the post. In one implementation, the field change table is a childtable of the event hifeed tracked update table. In anotherimplementation, the text can be identified in the transaction (e.g., aquery command), stripped out, and put into the entry at the appropriatecolumn. The various tables described herein can be combined or separatedin various ways. For example, the post table and the field change tablemay be part of the same table or distinct tables, or may includeoverlapping portions of data.

In block 1060, a comment is received for an event and the comment isadded to a comment table (e.g., comment table 930). The comment could befor a post or an update of a record, from which a feed tracked updatecan be generated for display. In one implementation, the text can beidentified in the transaction (e.g., a query command), stripped out, andput into the entry at the appropriate column.

D. Reading information from feed hifeed tracked update tables

FIG. 11 shows a flowchart of an example of a method 1100 for reading afeed item as part of generating a feed for display, performed inaccordance with some implementations. In one implementation, the feeditem may be read as part of creating a feed for a record.

In block 1110, a query is received for an events history table (e.g.,event hifeed tracked update table 910) for events related to aparticular record. In one implementation, the query includes anidentifier of the record for which the feed is being requested. Invarious implementations, the query may be initiated from a detail pageof the record, a home page of a user requesting the record feed, or froma listing of different records (e.g., obtained from a search or frombrowsing).

In block 1120, the user's security level can be checked to determine ifthe user can view the record feed. Typically, a user can view a recordfeed, if the user can access the record. This security check can beperformed in various ways. In one implementation, a first table ischecked to see if the user has a classification (e.g., a security levelthat allows him to view records of the given type). In anotherimplementation, a second table is checked to see if the user is allowedto see the specific record. The first table can be checked before thesecond table, and both tables can be different sections of a same table.If the user has requested the feed from the detail page of the record,one implementation can skip the security level check for the recordsince the check was already done when the user requested to view thedetail page.

In one implementation, a security check is determined upon each requestto view the record feed. Thus, whether or not a feed item is displayedto a user is determined based on access rights, e.g., when the userrequests to see a feed of a record or a news feed of all the objects theuser is following. In this manner, if a user's security changes, a feedautomatically adapts to the user's security level when it is changed. Inanother implementation, a feed can be computed before being requestedand a subsequent security check can be made to determine whether theperson still has access right to view the feed items. The security(access) check may be at the field level, as well as at the recordlevel.

In block 1130, if the user can access the record, a field level securitytable can be checked to determine whether the user can see particularfields. In one implementation, only those fields are displayed to theuser. Alternatively, a subset of those the user has access to isdisplayed. The field level security check may optionally be performed atthe same time and even using the same operation as the record levelcheck. In addition, the record type check may also be performed at thistime. If the user can only see certain fields, then any feed itemsrelated to those fields (e.g., as determined from field change table920) can be removed from the feed being displayed.

In block 1140, the feed items that the user has access to are displayed.In one implementation, a predetermined number (e.g., 20) of feed itemsare displayed at a time. The method can display the first 20 feed itemsthat are found to be readable, and then determine others while the useris viewing the first 20. In another implementation, the other feed itemsare not determined until the user requests to see them, e.g., byactivating a see more link.

FIG. 12 shows a flowchart of an example of a method 1200 for reading afeed item of a profile feed for display, performed in accordance withsome implementations. In one implementation, the query includes anidentifier of the user profile feed that is being requested. Certainblocks may be optional, as is also true for other methods describedherein. For example, security checks may not be performed.

In block 1210, a query is directed to an event hifeed tracked updatetable (e.g., event hifeed tracked update table 910) for events having afirst user as the actor of the event (e.g., creation of an account) oron which the event occurred (e.g., a post to the user's profile). Invarious implementations, the query may be initiated by a second userfrom the user's profile page, a home page of a user requesting theprofile feed (e.g., from a list of users being followed), or from alisting of different users (e.g., obtained from a search or frombrowsing). Various mechanisms for determining aspects of events andobtaining information from tables can be the same across any of themethods described herein.

In block 1220, a security check may also be performed on whether thesecond user can see the first user's profile. In one implementation anyuser can see the profile of another user of the same tenant, and block1220 is optional.

In block 1230, a security (access) check can be performed for the feedtracked updates based on record types, records, and/or fields, as wellsecurity checks for messages. In one implementation, only the feedtracked updates related to records that the person has updated are theones that need security check as the feed items about the user arereadable by any user of the same tenant. Users of other tenants are notnavigable, and thus security can be enforced at a tenant level. Inanother implementation, messages can be checked for keywords or links toa record or field that the second user does not have access.

As users can have different security classifications, it is importantthat a user with a low-level security cannot see changes to records thathave been performed by a user with high-level security. In oneimplementation, each feed item can be checked and then the viewableresults displayed, but this can be inefficient. For example, such asecurity check may take a long time, and the second user would like toget some results sooner rather than later. The following blocksillustrate one implementation of how security might be checked for afirst user that has a lot of feed items, but the second user cannot seemost of them. This implementation can be used for all situations, butcan be effective in the above situation.

In block 1231, a designated number of entries are retrieved from theevent hifeed tracked update table (e.g., starting from the most recent,which may be determined from the event identifier). The retrievedentries may just be ones that match the user ID of the query. In oneimplementation, entries are checked to find the entries that areassociated with the user and with a record (i.e. not just posts to theuser account). In another implementation, those entries associated withthe user are allowed to be viewed, e.g., because the second user can seethe profile of the first user as determined in block 1220.

In block 1232, the record identifiers are organized by type and the typeis checked on whether the second user can see the record types. Otherchecks such as whether a record was manually shared (e.g., by the owner)can also be performed. In one implementation, the queries for thedifferent types can be done in parallel.

In block 1233, if a user can see the record type, then a check can beperformed on the specific record. In one implementation, if a user cansee a record type, then the user can see all of the records of thattype, and so this block can be skipped. In another implementation, thesharing model can account for whether a user below the second user(e.g., the second user is a manager) can see the record. In such animplementation, the second user may see such a record. In oneimplementation, if a user cannot see a specific record, then comments onthat record are also not viewable.

In block 1234, field level sharing rules can be used to determinewhether the second user can see information about an update or value ofcertain fields. In one implementation, messages can be analyzed todetermine if reference to a particular field name is made. If so, thenfield level security can be applied to the messages.

In block 1280, blocks 1231-1234 are repeated until a stopping criterionis met. In one implementation, the stopping criteria may be when amaximum number (e.g., 100) of entries that are viewable have beenidentified. In another implementation, the stopping criteria can be thata maximum number (e.g., 500) of entries from the entity hifeed trackedupdate table have been analyzed, regardless of whether the entries areviewable or not.

In one implementation, a news feed can be generated as a combination ofthe profile feeds and the entity feeds, e.g., as described above. In oneimplementation, a list of records and user profiles for the queries inblocks 1110 and 1210 can be obtained form user subscription table 940.In one implementation, there is a maximum number of objects that can befollowed.

In various implementations, the entity hifeed tracked update table canbe queried for any one or more of the following matching variables aspart of determining items for a feed: CreatedDate, CreatedById,CreatedBy.FirstName, CreatedBy.LastName, ParentId, and Parent.Name. Thechild tables can also be queried for any one or more of the followingmatching variables as part of determining items for a feed: DataType,FieldName, OldValue, and NewValue. A query can also specify how theresulting feed items can be sorted for display, e.g., by event number,date, importance, etc. The query can also include a number of items tobe returned, which can be enforced at the server.

The two examples provided above can be done periodically to create thefeeds ahead of time or done dynamically at the time the display of afeed is requested. Such a dynamic calculation can be computationallyintensive for a news feed, particularly if many users and records arebeing followed, although there can be a low demand for storage.Accordingly, one implementation performs some calculations ahead of timeand stores the results in order to create a news feed.

E. Partial Pre-Computing of items for a feed

FIG. 13 shows a flowchart of an example of a method 1300 of storingevent information for efficient generation of feed items to display in afeed, performed in accordance with some implementations. In variousimplementations, method 1300 can be performed each time an event iswritten to the events hifeed tracked update table, or periodically basedon some other criteria (e.g., every minute, after five updates have beenmade, etc.).

In block 1310, data indicative of an event is received. The data may bethe same and identified in the same way as described for block 1010. Theevent may be written to an event hifeed tracked update table (e.g.,table 910).

In block 1320, the object(s) associated with the event are identified.In various implementations, the object may be identified by according tovarious criteria, such as the record being changed, the user changingthe record, a user posting a message, and a user whose profile themessage is being posted to.

In block 1330, the users following the event are determined. In oneimplementation, one or more objects that are associated with the eventare used to determine the users following the event. In oneimplementation, a subscription table (e.g., table 940) can be used tofind the identified objects. The entries of the identified objects cancontain an identifier (e.g., user ID 941) of each the users followingthe object

In block 1340, the event and the source of the event, e.g., a record(for a record update) or a posting user (for a user-generated post) arewritten to a news feed table along with an event identifier. In oneimplementation, such information is added as a separate entry into thenews feed table along with the event ID. In another implementation, eachof the events for a user is added as a new column for the row of theuser. In yet another implementation, more columns (e.g., columns fromthe other tables) can be added.

News feed table 960 shows an example of such a table with user ID 961and event ID or pointer 962. The table can be organized in any manner.One difference from event hifeed tracked update table 910 is that oneevent can have multiple entries (one for each subscriber) in the newsfeed table 960. In one implementation, all of the entries for a sameuser are grouped together, e.g., as shown. The user U819 is shown asfollowing events E37 and E90, and thus any of the individual feed itemsresulting from those events. In another implementation, any new entriesare added at the end of the table. Thus, all of the followers for a newevent can be added as a group. In such an implementation, the event IDswould generally be grouped together in the table. Of course, the tablecan be sorted in any suitable manner.

In an implementation, if the number of users is small, then the feeditems in one or more of the tables may be written as part of the samewrite transaction. In one implementation, the determination of smalldepends on the number of updates performed for the event (e.g., amaximum number of update operations may be allowed), and if moreoperations are performed, then the addition of the feed items isperformed. In one aspect, the number of operations can be counted by thenumber of rows to be updated, including the rows of the record (whichdepends on the update event), and the rows of the hifeed tracked updatetables, which can depend on the number of followers. In anotherimplementation, if the number of users is large, the rest of the feeditems can be created by batch. In one implementation, the feed items arealways written as part of a different transaction, i.e., by batch job.

In one implementation, security checks can be performed before an entryis added to the news feed table 960. In this manner, security checks canbe performed during batch jobs and may not have to be performed at thetime of requesting a news feed. In one implementation, the event can beanalyzed and if access is not allowed to a feed item of the event, thenan entry is not added. In one aspect, multiple feed items for a sameuser may not result from a same event (e.g., by how an event is definedin table 910), and thus there is no concern about a user missing a feeditem that he/she should be able to view.

In block 1350, a request for a news feed is received from a user. In oneimplementation, the request is obtained when a user navigates to theuser's home page. In another implementation, the user selects a table,link, or other page item that causes the request to be sent.

In block 1360, the news feed table and other tables are accessed toprovide displayable feed items of the news feed. The news feed can thenbe displayed. In one implementation, the news feed table can then bejoined with the event hifeed tracked update table to determine the feeditems. For example, the news feed table 960 can be searched for entrieswith a particular user ID. These entries can be used to identify evententries in event hifeed tracked update table 910, and the properinformation from any child tables can be retrieved. The feed items(e.g., feed tracked updates and messages) can then be generated fordisplay.

In one implementation, the most recent feed items (e.g., 100 mostrecent) are determined first. The other feed items may then bedetermined in a batch process. Thus, the feed item that a user is mostlikely to view can come up first, and the user may not recognize thatthe other feed items are being done in batch. In one implementation, themost recent feed items can be gauged by the event identifiers. Inanother implementation, the feed items with a highest importance levelcan be displayed first. The highest importance being determined by oneor more criteria, such as, who posted the feed item, how recently, howrelated to other feed items, etc.

In one implementation where the user subscription table 940 is used todynamically create a news feed, the query would search the subscriptiontable, and then use the object IDs to search the event hifeed trackedupdate table (one search for each object the user is following). Thus,the query for the news feed can be proportional to the number of objectsthat one was subscribing to. The news feed table allows the intermediateblock of determining the object IDs to be done at an earlier stage sothat the relevant events are already known. Thus, the determination ofthe feed is no longer proportional to the number of object beingfollowed.

In some implementations, a news feed table can include a pointer (asopposed to an event identifier) to the event hifeed tracked update tablefor each event that is being followed by the user. In this manner, theevent entries can immediately be retrieved without having to perform asearch on the event hifeed tracked update table. Security checks can bemade at this time, and the text for the feed tracked updates can begenerated.

X. Display Of a Feed

Feeds include messages and feed tracked updates and can show up in manyplaces in an application interface with the database system. In oneimplementation, feeds can be scoped to the context of the page on whichthey are being displayed. For example, how a feed tracked update ispresented can vary depending on which page it is being displayed (e.g.,in news feeds, on a detail page of a record, and even based on how theuser ended up at a particular page). In another implementation, only afinite number of feed items are displayed (e.g., 50). In oneimplementation, there can be a limit specifically on the number of feedtracked updates or messages displayed. Alternatively, the limit can beapplied to particular types of feed tracked updates or messages. Forexample, only the most recent changes (e.g., 5 most recent) for a fieldmay be displayed. Also, the number of fields for which changes aredisplayed can also be limited. Such limits can also be placed on profilefeeds and news feeds. In one implementation, feed items may also besubject to certain filtering criteria before being displayed, e.g., asdescribed below.

A. Sharing rules for feeds

As mentioned above, a user may not be allowed to see all of the recordsin the database, and not even all of the records of the organization towhich the user belongs. A user can also be restricted from viewingcertain fields of a record that the user is otherwise authorized toview. Accordingly, certain implementations use access rules (also calledsharing rules and field-level security FLS) to ensure that a user doesnot view a feed tracked update or message that the user is notauthorized to see. A feed of a record can be subject to the same accessrules as the parent record.

In one implementation, access rules can be used to prevent subscriptionto a record that the user cannot see. In one implementation, a user cansee a record, but only some of the fields. In such instances, only itemsabout fields that the user can access may be displayed. In anotherimplementation, sharing rules and FLS are applied before a feed item isbeing added to a feed. In another implementation, sharing rules and FLSare applied after a feed item has been added and when the feed is beingdisplayed. When a restriction of display is mentioned, the enforcementof access rules may occur at any stage before display.

In some implementations, the access rules can be enforced when a queryis provided to a record or a user's profile to obtain feed items for anews feed of a user. The access rules can be checked andcross-references with the feed items that are in the feed. Then, thequery can only return feed items for which the user has access.

In other implementations, the access rules can be enforced when a userselects a specific profile feed or record feed. For example, when a userarrives on a home page (or selects a tab to see the record feed), thedatabase system can check to see which feed items the user can see. Insuch an implementation, each feed item can be associated with metadatathat identifies which field the feed item is about. Thus, in oneimplementation, a feed tracked update is not visible unless theassociated record and/or field are visible to the user.

In one example, when a user accesses a feed of a record, an access checkcan be performed to identify whether the user can access the object typeof the record. In one implementation, users are assigned a profile type,and the profile type is cross-referenced (e.g., by checking a table) todetermine whether the profile type of the user can see the object typeof the record.

In some implementations, access to specific records can be checked,e.g., after it has been determined that the user can access the recordtype. Rules can be used to determine the records viewable by a user.Such rules can determine the viewable records as a combination of thoseviewable by profile type, viewable due to a profile hierarchy (e.g., aboss can view records of profile types lower in the hierarchy), andviewable by manual sharing (e.g., as may be done by an owner of arecord). In one implementation, the records viewable by a user can bedetermined beforehand and stored in a table. In one implementation, thetable can be cross-referenced by user (or profile type of a user) toprovide a list of the records that the user can see, and the list can besearched to determine if the record at issue is among the list. Inanother implementation, the table can be cross-referenced by record todetermine a list of the profile types that can access the record, andthe list can be searched to find out if the requesting user is in thelist. In another implementation, the records viewable by a user can bedetermined dynamically at the time of the access check, e.g., byapplying rules to data (such as user profile and hierarchy information)obtained from querying one or more tables.

In other implementations, checks can be made as to whether a user hasaccess to certain fields of a record, e.g., after it has been determinedthat the user can access the record. In one aspect, the access check onfields can be performed on results already obtained from the database,to filter out fields that the user cannot see. In one implementation,the fields associated with retrieved feed items are determined, andthese fields are cross-referenced with an access table that contains thefields accessible by the user (e.g., using the profile type of theuser). Such an access table could also be a negative access table byspecifying fields that the user cannot see, as can other access tablesmentioned herein. In one implementation, the field level access table isstored in cache at a server.

In one implementation, a user can see the same fields across all recordsof a certain type (e.g., as long as the user can see the record). In oneimplementation, there is a field level access table for each objecttype. The access table can be cross-referenced by user (e.g., viaprofile type) or field. For example, a field can be identified alongwith the profile types that can see the field, and it can be determinedwhether the user's profile type is listed. In another example, the usercan be found and the fields to which the user has access can beobtained. In another implementation, the accessible fields could bespecified for each record.

Regarding profile feeds and news feeds, a first user may perform anaction on a record, and a feed tracked update may be generated and addedto the first user's profile feed. A second user who is allowed to followthe first user may not have access rights to the record. Thus, the feedtracked update can be excluded from a news feed of the second user, orwhen the second user views the first user's profile feed directly. Inone implementation, if a user is already on the detail page, thenanother access check (at least at the record level) may optionally notbe performed since a check was already done in order to view the detailpage.

In some implementations, for profile feeds and news feeds, the feeditems can be organized by object type. IT can then be determined whetherthe requesting user can access to those object types. Other accesschecks can be done independently or in conjunction with these accesschecks, as is described above.

B. API Implementation

Various implementations can implement the access rules in various ways.In one implementation, all recent feed items (or more generally events)are retrieved from a feed that is ready for display (e.g., after a feedgenerator performs formatting) or a table. Then, bulk sharing checks canbe applied on the retrieved items. The viewable feed items of the mostrecent set can then be displayed.

In another implementation regarding a profile feed, for non-VAD (viewall data) users, i.e. users who can see everything, certain functionscan be overridden. In one implementation, a FROM clause in a query canbe overridden to be a pipelined function, e.g., with different parts ofthe query being operated on at the same time, but with differentoperations of a pipeline. This pipeline function can be given a rowlimit and the maximum number of sharing checks to run. It can loop,selecting the next batch of rows, run sharing checks against them inbulk, and pipe back any IDs which are accessible. In one aspect, innearly all cases, the user feed can contain accessible IDs so thesharing checks can pass on the first loop. However, it is possible thesharing may have changed such that this user's access is greatlyreduced. In one worst case, implementations can run sharing checks on upto the maximum number of sharing check rows (e.g., a default 500) andthen terminate the function with the IDs which passed so far, possiblyzero. Such an example includes a low level person viewing profile feedof CEO.

In some implementations, if the user has a small number of subscriptions(e.g., <25), then implementations can first run sharing checks on thoseIDs and then drive the main query from those accessible IDs, as opposedto a semi-join against the subscription and running sharing checks onthe resulting rows. In other implementations, FLS is enforced bybuilding up a TABLE CAST of the accessible field IDs from the cachedvalues. A main query can then join against this table to filter onlyaccessible fields.

XI. Filtering And Searching Feeds

It can be possible that a user subscribes to many users and records,which can cause a user's news feed to be very long and include many feeditems. In such instances, it can be difficult for the user to read everyfeed item, and thus some important or interesting feed items may not beread. In some implementations, filters may be used to determine whichfeed items are added to a feed or displayed in the feed, even though auser may be authorized to see more than what is displayed. Section VII.Ealso provides a description of filtering based on criteria.

In one implementation, an “interestingness” filter can function as amodule for controlling/recommending which feed tracked updates make itto the news feed when the number of items that a user subscribes to islarge. In one such implementation, a user can specify a filter, which isapplied to a user's news feed or to record and profile feeds that theuser requests. Different filters can be used for each. For example,processing can be done on the news feed to figure out which feed trackedupdates are the most relevant to the user. One implementation can use animportance weight and level/ranking, as described herein. Otherimplementations can include a user specifying keywords for a message andspecifying which records or users are most important.

In one implementation, a filter can be used that only allows certainfeed items to be added to a feed and/or to be displayed as part of afeed. A filter can be used such that the removal or non-addition ofcertain feed items automatically occur for any new feed items after thefilter criteria are entered. The filter criteria can also be addedretroactively. The criteria of such a filter can be applied via a querymechanism as part of adding a feed item to a table or displaying a feed,as described in sections above. In various implementations, a user candirectly write a query or create the query through a graphical userinterface.

FIG. 14 shows a flowchart of an example of a method 1400 for creating acustom feed for users of a database system using filtering criteria,performed in accordance with some implementations. Any of the followingblocks can be performed wholly or partially with the database system,and in particular by one or more processor of the database system.

In block 1410, one or more criteria specifying which feed items are tobe displayed to a first user are received from a tenant. In oneimplementation, the criteria specifies which items to add to the customfeed. For example, the criteria could specify to only include feed itemsfor certain fields of a record, messages including certain keywords, andother criteria mentioned herein. In another implementation, the criteriaspecifies which items to remove from the custom feed. For example, thecriteria could specify not to include feed items about certain fields orincluding certain keywords.

In block 1420, the database system identifies feed items of one or moreselected objects that match the criteria. The feed items can be storedin the database, e.g., in one or more of the tables of FIG. 9A. In oneimplementation, the one or more selected objects are the objects thatthe first user is following. In another implementation, the one or moreselected objects is a single record whose record feed the first user isrequesting.

In block 1430, the feed items that match the criteria are displayed tothe first user in the custom feed. The generation of text for a feedtracked update can occur after the identification of the feed items(e.g., data for a field change) and before the display of the finalversion of the feed item.

In one implementation, the criteria are received before a feed item iscreated. In another implementation, the criteria are received from thefirst user. In one aspect, the criteria may only used for determiningfeeds to display to the first user. In yet another implementation, thecriteria are received from a first tenant and applies to all of theusers of the first tenant. Also, in an implementation where a pluralityof criteria are specified, the criteria may be satisfied for a feed itemif one criterion is satisfied.

Some implementations can provide mechanisms to search for feed items ofinterest. For example, the feed items can be searched by keyword, e.g.,as entered by a user. As another example, a tab (or other selectiondevice) can show feed items about or from a particular user. In oneimplementation, only messages (or even just comments) from a particularuser can be selected.

In another implementation, a user can enter search criteria so that thefeed items currently displayed are searched and a new list of matchingfeed items is displayed. A search box can be used to enter keywords.Picklists, menus, or other mechanisms can be used to select searchcriteria. In yet another implementation, feed comments are text-indexedand searchable. Feed comments accessibility and visibility can apply onthe search operation too.

In one implementation, when a user performs a search of feeds, there canbe an implicit filter of the user (e.g., by user ID). This can restrictthe search to only the news feed of the user, and thus to only recordfeeds and profile feeds that the user is subscribed. In anotherimplementation, searches can also be done across feeds of users andrecords that are not being subscribed.

Besides searching for feed items that match a criteria, one also couldsearch for a particular feed item. However, in one implementation, auser cannot directly query a feed item or feed comment. In such animplementation, a user can query to obtain a particular profile orrecord feed, and then navigate to the feed item (e.g., as child of theparent feed). In another implementation, the relationship from a feed toits parent entity (e.g., a record or user profile) is uni-directional.That is a user can navigate from the feed to the parent but not viceversa.

In one implementation, a user can directly query the child tables, e.g.,comment table 930. Thus, a user could search for comments only that userhas made, or comments that contain certain words. In anotherimplementation, a user can search for a profile feed of only one user.In yet another implementation, a user can search for profile feeds ofmultiple users (e.g., by specifying multiple user names or IDs), whichcan be combined into a single feed.

XII. Maintaining Records For Follower'S Feeds

If every feed item is stored and maintained on a follower's feed or evenin the profile and/or record feeds, the amount of data to be storedcould be massive, enough to cause storage issues in the system. In oneimplementation, the N (e.g., 50) most recent feed items for each feedare kept. However, there can be a need to keep certain older feed items.Thus, implementations can remove certain feed items, while keepingothers. In other implementations, old feed tracked updates may bearchived in a data store separate from where recent feed items arestored.

In some implementations, feeds are purged by a routine (also called areaper) that can remove items deemed not worthy to keep (e.g., olditems). Any underlying data structures from which feed items are createdcan also be purged. In one implementation, the reaper can remove certainitems when new items are added (e.g., after every 5th item added). Asanother example, feed items may be deleted synchronously during the saveoperation itself. However, this may slow down each save operation. Inone implementation, however, this may be better than incurring a largercost when the items are removed at longer intervals. In anotherimplementation, the reaper can run periodically as a batch process. Suchroutines can ensure that a table size does not become too large. In oneaspect, a reaper routine can keep the event hifeed tracked update tablerelatively small so the sharing checks are not extremely expensive.

In various implementations, the reaper can maintain a minimum number(e.g., 50 or 100) of feed items per record, maintain a minimum number ofrecords per user (e.g., per user ID), and not deleting feed items (orentire records), which have comments against it. Such implementationscan ensure that the detail page and profile page have sufficient data todisplay in a feed. Note that the sharing checks for feed queries can cutdown the number of records further for users with less access. Thus, thenumber of records finally displayed for specific users can besignificantly less than a minimum number for a specific profile orrecord feed. In one implementation, a reaper deletes data that is olderthan a specified time (e.g., 6 months or a year).

In one implementation, the reaper can perform the deletion of feed items(purging) as a batch up deletion. This can avoid deletion of largenumber of records that may lead to locking issues. In anotherimplementation, the reaper can be run often so that the table does notbecome difficult to manage (e.g., size-wise). In this way the reaper canwork on a limited set of records. In one implementation, the reaper mayhave logic that deletes certain items (e.g., by an identification) fromtables (e.g., those in FIG. 9A), or sections of the tables.

XIII. Implementation of a social network information feed as a platform

While the above discussion describes some implementations, variousadditional implementations are described herein. In some instances,different and/or alternate implementations may be discussed. Forexample, different types of feed queries and different systems andmethods for generating an information feed may be described.

In various implementations, an online social network may implement aplatform for generating an information feed. The platform may be used toquery one or more database tables for feed items and return the resultof the query to generate an information feed. Thus, the platform mayprovide one or more views of a database table storing feed items. Invarious implementations, the result of the query is provided to a clientapplication. A client application may refer to a computer applicationthat may provide an application programming interface to other externalcomputer applications, such as a user's email client. Thus, a clientapplication may receive the result of the query and provide the resultto a user at a user interface of a computing device.

In some implementations, the platform for generating an information feedmay include a first and second component. The first component may be aninstantiation of a class of data objects that performs a database query.Thus, the first component may query the database to identify feed itemsto be included in an information feed. The second component may be aninstantiation of a class of data objects that receives parameters thatdrive the database query. Thus, the second component may receiveparameters from a user or client application and may pass the parametersto the first component to parameterize the database query.

In various implementations, the platform for generating an informationfeed may retrieve formatting and contextual information associated withthe result object, and include the formatting and contextual informationwith the result object to generate an intermediary data structure. Insome implementations, formatting and contextual information may refer toadditional information about a feed item that indicates a presentation,such as a graphical representation, of the feed item. Thus, theintermediary data structure may be a data structure that stores all feeditems to be included in the information feed as well as the contextualand formatting information associated with the feed items. Furthermore,the intermediary data structure may be accessible by and readable bymultiple client applications. Thus, one or more client applications mayrender the intermediary data structure into an image or graphicaldepiction of the information feed.

In various implementations a feed item handler interface is provided.The feed item handler interface may customize feed items included in theresult object by changing or modifying a presentation or functionalityof one or more feed items. The feed item handler interface may handledatabase queries for a particular feed item type. Thus, the feed itemhandler interface may receive an input identifying a new feed item type,query data relevant to the new feed item type, and provide the returneddata to one or more feed items during the generation of the intermediarydata structure. In various implementations, the returned data iscombined with the feed items to change or modify the shape orpresentation of the feed times such that they include a new or differentpresentation or functionality when stored in the intermediary datastructure.

FIG. 15 shows a flowchart of an example of a social network feed method1500, performed in accordance with some implementations. In variousimplementations, social network feed method 1500 may be used to generatean information feed. As previously discussed, an information feed mayrefer to a combination (e.g., a list) of feed items or entries withvarious types of information and data that may be stored and maintainedin one or more database tables, e.g., as rows in the table(s), that canbe accessed to retrieve relevant information to be presented as part ofa displayed feed. In various embodiments, social network feed method1500 may use a query plan to query a database for relevant feed itemsand provide a result of the query. In some implementations, a differentquery plan may be provided for different or new feed types. Thus, socialnetwork feed method 1500 may implement different types of feed queriesto generate different types of feeds. As similarly discussed above, aresult of a feed query may be stored in a single data structure that isaccessible and readable by many different types of client applications.

In FIG. 15, at block 1502, at least one feed parameter may bedetermined. In various implementations a feed parameter may refer to aparameter that identifies a characteristic of at least one feed item tobe included in the information feed. In some implementations, acharacteristic of a feed item may refer to a type of data field includedin the feed item. For example, a feed item may have a particular datafield or type of data field dedicated to storing a username of a userwith which the feed item is associated. In various implementations afeed parameter for a type of feed may be determined based on the type ofinformation used by the information feed that is being generated. Forexample, if a news feed is being generated for a user, the feedparameter may be the user's username because the username must first beidentified in order to generate an information feed for that particularuser.

In FIG. 15, at block 1504, at least one feed search strategy may bedetermined based on the determined at least one feed parameter. Invarious implementations, the feed search strategy may identify a feedquery to be performed on a database system storing feed items. In someimplementations, the feed query may be a database query plan written ina database query language. The database query plan may be capable ofidentifying one or more feed items based on the feed parameters. Invarious implementations, the feed search strategy may be identifiedbased on the type of feed parameter that has been determined. Returningto the previous example, if the feed parameter is a user's username, thedatabase service provider may implement a feed search strategy thatqueries only the type of data field of a feed item that is used to storea username.

In FIG. 15, at block 1506, at least one feed item may be identifiedbased on the determined at least one feed parameter and the at least onesearch strategy. Thus, according to various implementations, thedatabase service provider may run the feed query as specified by thefeed parameters and the feed search strategy to search the databasesystem for feed items that should be included in the information feed.In various implementations, the feed query may return a result thatidentifies all feed items that should be included in the informationfeed.

In FIG. 15, at block 1508, a result object may be generated. In someimplementations, the result object may be a data structure including aresult returned by the feed query. Thus, the result object may includeall feed items identified by the feed query. In various implementations,if different client applications request the same feed query, the clientapplications may access the results stored in the result object insteadof each performing their own database query. Thus, storing the feeditems returned by the feed query in the result object reduces redundantand unnecessary iterations of the feed query that may otherwise beperformed by client applications. Furthermore, if one client applicationdisplays the same information feed several times during presentation ofthe information feed to a user, the client application may retrieve theresults from the result object instead of re-querying the databasemultiple times.

In FIG. 15, at block 1510, the result object may be stored in one ormore storage mediums. In various implementations, the one or morestorage mediums may be included in a multitenant database accessible toa plurality of entities in an on-demand computing services environment.Thus, in response to querying the database and returning all relevantfeed items, the database service provider may store the result object ina multitenant database. In various implementations, the result object isstored in a location accessible by multiple entities so that themultiple entities may access the results of the feed query without eachof the entities having to execute its own feed query.

FIG. 16 shows a flowchart of an example of an information feedgeneration method 1600, performed in accordance with someimplementations. In various implementations, information feed generationmethod 1600 may identify feed items to be included in an informationfeed, and generate a result object storing the feed items. In someimplementations a feed data layer is used to implement information feedgeneration method 1600. The feed data layer may be a layer of a computerprogram or application used to implement a platform capable ofgenerating an information feed. Accordingly, information feed generationmethod 1600 may identify feed parameters, identify a feed searchstrategy, identify feed items based on the feed parameters and the feedsearch strategy, and generate a result object that includes theidentified feed items.

In FIG. 16, at block 1602, a request to generate an information feed maybe received. In various implementations, the request may be issued by aclient application. For example, a client application may be a web userinterface layer that renders and displays an information feed to a userof a database service. The user may provide an input indicating that aninformation feed should be displayed. For example, a user may send arequest to view feed tracked updates for a particular record. Inresponse to receiving this request, the web user interface layer mayforward the request to one or more computing devices of the databaseservice provider. In various implementations, the request is a messageidentifying a type of information feed that should be generated, andfurther identifying a record or entity for which the information feedshould be generated for.

Accordingly, in FIG. 16, at block 1604, feed parameters may beidentified. As previously discussed with reference to FIG. 15, block1502, a feed parameter may refer to a parameter that identifies acharacteristic of a feed item to be included in an information feed. Invarious implementations, the feed parameters may be identified by thedatabase service provider in response to receiving the request of block1602. In various implementations, the database service provider maydetermine the feed parameters based on designated associations betweentypes of feeds and types of parameters that those feeds receive. Adesignated association may be an association between a parameter and atype of feed that determines what type of parameter a query looks to inorder to generate the particular type of feed. In some implementations,the designated association may be determined by a database serviceprovider upon implementation of a database service.

For example, as previously discussed with reference to FIG. 15, block1502, a news feed may be requested for a particular user. Whenimplementing the database service, the database service provider mayhave determined that a news feed may be generated based on a user ID.Thus, a user's user ID may be a parameter associated with a news feed.Accordingly, in response to receiving a request for a news feed, a feedparameter of user ID may be identified based on the designatedassociation for a news feed.

In various implementations, the database service provider may use animplementation of a class of data objects, such as an extensible javaclass, to designate an association between the feed type and one or moreparameters. In various implementations, the class may define a libraryof functions that provides an interface between the client applicationand the software application that queries the database storing the feeditems. The interface may receive parameters from the client application,and pass the parameters to the software application that runs the query.A particular instantiation of the class of data objects may designate anassociated between a feed type and one or more parameters.

Returning to the previous example, the database service provider mayprovide an abstract base class called “FeedParams.” The class“FeedParams” may refer to a class of functions that receive one or moreparameters from a client application and pass the one or more parametersto the computer application that performs the database query. For theinformation feed “NewsFeed,” an implementation of the class “FeedParams”may be created and called “NewsFeedParams.” “NewsFeedParams” may be aninstantiation of the class “FeedParams” that is specifically configuredto receive and pass along the parameters that would be provided when anews feed for a record is requested. For example, if a news feed for auser is requested, the user's name or user ID may be a parameter. Thus,“NewsFeedParams” may be configured to receive a user ID as a parameterand pass the user ID to a computer application that performs thedatabase query.

In FIG. 16, at block 1606, a feed search strategy may be identifiedbased on the identified feed parameters. As previously discussed withreference to FIG. 15, block 1504, a feed search strategy may identify afeed query or query plan to be issued to a database system storing feeditems. In various implementations, the feed search strategy may beidentified in response to receiving the request of block 1602.

As similarly discussed with reference to block 1604, the databaseservice provider may use an abstract base class of data objects, such asan extensible java class, to implement the feed search strategy. In thisinstance, the class may define a library of functions that receive feedparameters from the feed parameter interface, and execute a query planof the database based on the received parameters. Thus, animplementation of the abstract base class may provide an interfacebetween a software interface that receives parameters from the clientapplication and the database that is queried. Moreover, a particularinstantiation of the class of data objects may designate an associationbetween the types of parameters received and the type of query plan thatis implemented.

Returning to the previous example, the database service provider mayprovide an abstract base class called “FeedStrategy.” The class“FeedStrategy” may refer to a class of functions that execute a queryplan of the database based on one or more received parameters. For theinformation feed “NewsFeed,” an implementation of the class“FeedStrategy” may be created and called “NewsFeedStrategy.”“NewsFeedStrategy” may be an instantiation of the class “FeedStrategy”that is specifically configured to perform a query plan for theparticular type of information feed “NewsFeed.” For example, aspreviously discussed, if a news feed for a user is requested, the user'sname or user ID may be a parameter. Thus, “NewsFeedStrategy” may beconfigured to receive a user ID as a parameter and perform a databasequery based on the received parameter. In various implementations,implementing a feed strategy for a particular type of information feedallows the database service provider to optimize the query plan for thatparticular type of information feed.

In FIG. 16, at block 1608, feed items may be identified based on thefeed parameters and feed strategy. Thus, one or more computing devicesor servers operated by the database service provider may execute thefeed search strategy to query the database. In some implementations, theentire one or more database tables storing feed items may be queried. Invarious implementations, the query plan identified by the feed strategymay be designed so that the query is constrained. For example, the querymay be constrained to one database table, or a portion of a databasetable. Implementing a feed search strategy that is constrained mayreduce the number of operations performed by the query plan and mayfurther optimize the query.

In various implementations, a feed item may be returned as a result ofthe query plan if the feed item includes one or more data values that isthe same as one or more data values identified by the feed parameters.For example, a feed item may be a status update for a user. The feeditem may include a data field or entry that identifies the username ofthe user with which the feed item is associated. If the feed itemreturns a username that is identified by the feed parameter, then thefeed item may be returned as a result of the query.

Returning to the previous example, a news feed may be requested for afirst user. In this instance, the first user may be “Madison Rigsby” whohas just posted a comment on a second user's profile. Because, a newsfeed is being requested for the first user, the instantiationsNewsFeedParams and NewsFeedStrategy may be used to determine a queryplan for the requested information feed. Thus, the parameter received byNewsFeedParams may be the first user's name (e.g. “Madison Rigsby”). Invarious implementations, the query plan may search database tablesstoring feed items for feed items including a data field or entry thatstores the data value “Madison Rigsby.” In this instance, the feed itemgenerated by Madison Rigsby's post would store her name in order toidentify which user made the post. Because the feed item stores hername, the feed item would be returned as a result of the query. Invarious implementations, just the feed item ID and not the whole feeditem may be returned as a result of the query.

In FIG. 16, at block 1610, a result object may be generated. Asdiscussed with reference to FIG. 15, block 1508, the result object maybe a data structure that includes feed items returned by the databasequery executed by the feed search strategy. In various implementations,the result object may include feed item IDs instead of the entire feeditems. Thus, if a feed item is identified as a feed item that should beincluded in the information feed, the ID for that feed item mayretrieved and stored in the result object. Storing the feed item IDinstead of the entire feed item may reduce the size of the result objectand reduce the storage of data that may be redundant (e.g. severalidentified feed items may store much of the same data). In variousimplementations, the database service provider may use a computingdevice, such as a storage server, to generate the result object. Theresult object may be stored in one or more storage mediums of amulti-tenant database system.

In various implementations, the generation of the result object may alsoprovide the ability to sort the feed items according to one or morecharacteristics of the feed item. In various implementations, sortingthe feed items may determine an order for feed items included in theinformation feed. For example, the result object may be a linear datastructure. The feed items stored in the result object may be storedaccording to an order. The order may be determined based on a sorting ofthe feed items. In various implementations, the feed items may be sortedaccording to a value stored in a particular data field of each feeditem. For example, the feed items may be sorted according to a post dateidentifying when a feed item was posted, when a last comment was made,or when a last action or a last activity occurred. In this instance, thefeed items may be sorted from most recent to least recent. The feeditems, or feed item IDs, may be stored in the result object according toan order determined by the sorting. When the information feed includingthe feed items is rendered, the feed items may be presented in theinformation feed according to the determined order.

In FIG. 16, at block 1612, additional feed data objects may beidentified based on the feed items identified by the result object. Aspreviously discussed, the result object may include feed item IDs.However, because the result object may largely include feed item IDs andother object identifiers, the information included in the result objectmay be relatively sparse. Thus, additional feed data objects may beidentified and retrieved to enhance the data included in the resultobject and provide additional information that may be used to displayfeed items to be included in the information feed.

In various implementations, additional feed data objects may refer todata objects that may be related to or associated with a feed item to beincluded in the information feed. In some implementations, an additionalfeed data object may be a data value stored in a data field of a recordrelated to the feed item. For example, the data value may identify thelast comment that was made for a record related to the feed item, howmany people have “liked” the feed item, a tracked change, or theidentity of a user who has edited the feed item.

In various implementations, the database service provider may query thedatabase storing the feed items to identify the additional feed dataobjects. In some implementations, the database service provider may useone or more computing devices to execute a software application, such asa data loader, to query data values stored in each feed item identifiedby the result object. The database service provider may retrieve datavalues stored by the feed item. For example, the result object mayinclude a feed item created by a post that was made by a user. The dataloader may use the feed item ID to identify and locate the feed item,and retrieve one or more data values storing a body of the post, whichmay be a string of text that was provided by the user. As discussedabove, the data loader may also retrieve related data objects that maystore data values identifying an additional post or event related to thestring of text. For example, a second user may indicate that he or she“likes” the post made by a first user. The “like” may be stored in adata object that is a child of the feed item. In another example, thepost may be a link to a url. Thus, the data loader may retrieve the urlcorresponding to the link.

In FIG. 16, at block 1614, the additional feed data objects may beincluded with the result object. As similarly discussed with referenceto FIG. 16, block 1610, the database service provider may use acomputing device, such as a storage server, to generate the resultobject. In some implementations, the result object may be stored in oneor more storage mediums of a multi-tenant database system.

FIG. 17 shows a flowchart of an example of a create new feed type method1700, performed in accordance with some implementations. In variousimplementations, create new feed type method 1700 may generate a newfeed type. In various implementations a new feed type may refer to a newor different view of the feed items stored in one or more databasetables. For example, a new feed type may be a list view of feeds, a feedidentifying “hot topics” which may be an information feed displayingpopular or active topics on a discussion board, or similarly, a“highlights” feed. According to various implementations, a new feed typemay be created by generating a new instantiation of a class of dataobjects used to generate an information feed. In variousimplementations, creating a new feed type creates a new view of feeditems that may be used by multiple client applications. Accordingly,create new feed type method 1700 may receive an indication of a new feedtype to be created, register the new feed type with a class of dataobjects, identify feed parameters and a feed search strategy associatedwith the new feed type, and declare the new feed parameters and feedsearch strategy.

In FIG. 17, at block 1702, an indication of a new feed type may bereceived. In various implementations, the indication of a new feed typemay be received from a client application, and received by the databaseservice provider. According to some implementations, the indication of anew feed type may be received when a client application requests a newor different view of an information feed. In various implementations,such a request may be provided by a user via a user interface of adisplay device.

In FIG. 17, at block 1704, the new feed type may be registered with aclass of data objects. In various implementations, the class of dataobjects may be implemented using a java class. In some implementations,the database service provider may register the new feed type by defininga new enumeration value that identifies the new feed type. Registeringthe new feed type with the class of data objects identifies the new feedtype as a data object having an object ID that may be used by any clientapplication having requisite access to the database system. Thus,registering the new feed type makes the new feed type accessible to andusable by multiple client applications.

In FIG. 17, at block 1706, feed parameters and a feed search strategymay be identified. As similarly discussed with reference to informationfeed generation method 1600, a database service provider may identifythe feed parameters and a feed search strategy based on designatedassociations between feed types and parameters received by the feedtypes. Therefore, while the feed type may be a new instantiation of theclass of data objects, the feed parameters and feed search strategy maybe identified based on existing designated associations.

In FIG. 17, at block 1708, one or more feed parameters may be declaredbased on the identified feed parameters. In various implementations, theone or more feed parameters may be declared to the class of dataobjects. In various implementations, declaring the one or more feedparameters identifies them as a variable that may be used by the newfeed type. Accordingly, declaring the one or more feed parameters allowsthe new feed type to receive the identified one or more feed parameters.

In FIG. 17, at block 1710, a feed search strategy may be declared basedon the identified feed search strategy. As similarly discussed withreference to block 1708, the feed search strategy may be declared to theclass of data objects. Declaring the feed search strategy identifies itas a variable that may be used by the new feed type. Accordingly,declaring the feed search strategy allows the new feed type to use theidentified feed search strategy when executing a query plan. Thus,according to various implementations, once the feed search strategy andfeed parameters are declared, the new feed type may be used by one ormore client applications to provide a new or different view of the feeditems stored in the database system.

FIG. 18 shows a flowchart of an example of an information feedpresentation method 1800, performed in accordance with someimplementations. In various implementations, information feedpresentation method 1800 may identify and retrieve additionalinformation to translate the result object into a data structure capableof being displayed to a user. In some implementations, the result objectincludes information, such as feed IDs and object identifiers, andadditional information, such as data objects identified by theidentifiers. Thus, the result information may include the raw data thatis to be included in an information feed. However, the result objectmight not provide any indication of how the raw data should bedisplayed. Thus, additional information may be identified and retrievedto determine how the raw data should be displayed. Furthermore,information feed presentation method 1800 may generate a single datastructure that may be accessed and rendered by multiple clientapplications. Thus, several client applications may access the sameintermediary data structure to display the information feed with minimalrendering.

In various implementations a feed presentation layer is used toimplement information feed presentation method 1800. As similarlydiscussed with reference to the feed data layer, the feed presentationlayer may be a layer of a computer program or application. In thisinstance, the computer program may be used to render the informationfeed or translate the information feed from a first format to a secondformat. Accordingly, information feed presentation method 1800 mayreceive a result object, identify contextual and formatting informationassociated with feed items identified by the result object, translatethe result object based on the contextual and formatting information,and generate an intermediate data structure that includes the translatedresult object.

In FIG. 18, at block 1802, a result object including feed items andadditional feed data objects for presentation in an information feed maybe received. As discussed with reference to FIG. 16, block 1614 theresult object may be a data structure including feed items or feed itemIDs as well as additional feed data objects. Thus, the result object mayinclude various information about one or more feed items. However, insome implementations, the information included in the received resultobject might not include information indicating how such informationshould be presented or displayed by a client application. Thus,additional information may be identified and retrieved to determine howthe feed item should be presented.

In FIG. 18, at block 1804, formatting information and contextualinformation may be identified. In various implementations, formattinginformation may refer to information indicating a visual or spatialconfiguration of data included in the received result object. Forexample, formatting information may provide a visual template thatdetermines that the body of a post should be displayed at the top of thefeed item while a time stamp should be displayed in a footer of the feeditem. Contextual information may refer to information that supplementsraw data included in the result object to create a description that maybe understood by a user. Thus, the contextual information may convert anindication of an event or a data field identifier into a full textsentence that provides a description of the event or data valueidentified by a data field identifier for a feed item. Some examples ofcontextual information may be a photographic image, a full name of auser, users identified by @mentions, #hashtags, links, tracked changetext, and full descriptions of time stamps. In various implementations,an @mention may refer to an indicator or identifier that indicates thata user has been mentioned in a post. In some implementations, the usermay be provided with a message that indicates that the user wasmentioned. In various implementations, a #hashtag may refer to anindicator or identifier that may mark a string of text characters as akeyword. In some implementations, marking a string of characters as akeyword makes the string of characters searchable by search functionsthat may be provided by the database service provider.

In various implementations, the formatting and contextual informationmay supplement the information included in the result object to indicateor identify a presentation of a feed item. In various implementations, apresentation of a feed item may refer to a graphical configuration ofthe information included in the feed item. Thus, the formatting andcontextual information may identify a particular configuration accordingto which the information included in a feed item is displayed. Invarious implementations, at block 1804, formatting and contextualinformation may be identified for all feed items identified by theresult object.

In various implementations, the formatting and contextual informationmay be identified based on designated associations between a type offeed item or additional feed data object and a rule established by adatabase service provider. In various implementations, the associationsmay be designated by the database service provider. Thus, according tovarious implementations, the database service provider may maintain oneor more records storing a library of rules. Each of the rules may beassociated with a particular type of feed item. For example, if a feeditem identifies a tracked change in which the owner of a record changes,a rule associated with a tracked change of owner may be called toidentify and generate contextual information, such as a text sentencedescribing a tracked change.

For example, the result object may include a feed item identifying atracked changed for a particular record. While the feed item mayidentify that a change has occurred, various other information might bemissing, such as which user made the change, and what the change was.Furthermore, while the tracked change may be identified as a trackedchange by data field identifier used by the database system provider,the data field identifier may be a data value that is not understandableby a user of the database system. For example, the data field identifiermay be a string of numbers or a memory address. Thus, contextualinformation may be retrieved to determine how such information should bepresented in the information feed viewed by the user. In this instance,the database service provider may call on a rule associated with trackedchanges in ownership to render to the tracked change into a textsentence that may be displayed in an information feed and understood bya user of the database system.

In another example, contextual information may be identified andretrieved to translate a user ID, such as “UID910,” into the user's fullname, such as “Madison Rigsby.” Similarly, contextual and formattinginformation may be used to identify and retrieve urls and photos. Forexample, the received result object may include a feed item thatidentifies a user associated with the feed item. In this example, theuser may have generated the feed item by creating a post. In response toidentifying the user's ID or name, the database service provider mayquery the feed item database for a photographic image of the user todisplay with the feed item.

In various implementations, the contextual information may be based onthe user's location. For example, if a user is located in the UnitedStates, full text sentences, the user's name, and time stamps may bepresented according to local customs in the United States. In oneexample, a time stamp may indicate that a tracked change occurred at12:30 PM on Jan. 02, 2012. In this instance, the user is located in theUnited States, so the date is displayed as month/day/year. In anotherexample, the user may be located in Germany. In this instance, the datewould be displayed as day/month/year. Similar modifications may be madefor sentence structure and presentation of names.

Accordingly, in FIG. 18, at block 1806, the result object may becombined with the contextual and formatting information. In variousimplementations, the database service provider may apply the rules tothe feed items included in the result object to combine the contextualand formatting information with the information stored in the resultobject. Incorporating the contextual and formatting informationsupplements the data of the result object to translate it from raw datainto data that may be understandable to a user of the database systemwhen presented in an information feed.

In FIG. 18, at block 1808, an intermediary data structure may begenerated. In various implementations, the intermediary data structureis generated based on the translated result object. Thus, theintermediary data structure may be a data structure that stores thetranslated result object including the raw data from the result object,the formatting information, and the contextual information. Thus, theintermediary data structure may include sufficient information toidentify a presentation of a feed item in an information feed that maybe rendered for presentation to a user of the database system andunderstood by the user. Furthermore, the intermediary data structure mayinclude sufficient information to allow rendering of the intermediarydata structure into a presentation of the information feed without anyadditional database query operations.

In various implementations, the intermediary data structure may bestored in a mid-level language capable of being read and rendered byclient applications. In some implementations, a mid-level language mayrefer to an intermediary format that may be read by multiple clientapplications, and rendered by each one into a different output, asdiscussed in greater detail below with respect to block 1812. In variousimplementations, the intermediary data structure may be stored in alocation of the database system that is accessible by several clientapplications.

In FIG. 18, at block 1810, the intermediary data structure may beprovided to one or more client applications. As discussed in greaterdetail with reference to FIG. 23, the database system may includeseveral client applications that provide database services to users ofthe database system. In various implementations, each client applicationmay be capable of requesting an information feed. In response toreceiving the request, the intermediary data structure may be providedto a client application for rendering.

In FIG. 18, at block 1812, the intermediary data structure may berendered. Thus, according to various implementations, the intermediarydata structure may be rendered by a client application into an output.In various implementations, the process of rendering the intermediarydata structure may refer to translating the intermediary data structureinto a higher level format that is more specific to a particularapplication. For example, the mid-level representation of theinformation feed may be rendered, or translated, into HTML. Rendering ofthe intermediary data structure may involve converted text characters,such as an apostrophe, into an HTML representation according to HTMLsyntax, such as “&APOS”. Thus, according to some implementations, uponbeing rendered into an HTML file by the client application, theinformation feed may be presented to a user at a user interfacedisplayed on a display device of a computer system.

In various implementations, the intermediary data structure may berendered by several client applications. For example, a first clientapplication may render the intermediary data structure into an imagedisplayed on a mobile device, such as a mobile phone, while a secondclient application may render the same intermediary data structure intoa HTML web-page. Thus, the same intermediary data structure may berendered into two different outputs by two different clientapplications. Accordingly, redundant database queries are reducedbecause several client applications have access to the intermediary datastructure and do not have to perform their own database queries toacquire information included in the intermediary data structure, or anyadditional information prior to rendering the intermediary datastructure into a presentation of the information feed.

FIG. 19 shows a flowchart of an example of a feed pagination method1900, performed in accordance with some implementations. In variousimplementations, feed pagination method 1900 may provide an informationfeed with the feature of paging. Paging may refer to a process in whichan information feed is generated and presented in a series of segmentsor pages. A page may refer to a portion of the information feed that isdisplayed on a display device to a user. In various implementations, apage may be displayed as a webpage. The process of paging may segment aninformation feed containing many feed items into smaller portions offeed items. Segmenting the display of the feed may simplify thepresentation of the feed when displayed in a user interface to a user.

In various implementations, feed pagination method 1900 is performed bya data layer used to perform feed generation method 1600. Morespecifically, feed pagination method 1900 may be implemented by the feedsearch strategy used by the data layer. Thus, feed pagination method1900 may provide paging during the generation of the information feed asprovided by the feed data layer, but prior to translation or renderingof the feed items as provided by the feed presentation layer. Thus, feedpagination method 1900 paginates result objects provided to the feedpresentation layer but does not alter the operation of the feedpresentation layer. Accordingly, the operation of feed pagination method1900 is transparent to client applications and may be implementedwithout changing the client applications.

In FIG. 19, at block 1902, a first result object including a firstportion of feed items may be generated. In various implementations, aportion of feed items may refer to a designated number of feed itemsthat may be displayed at a single time. Thus, the portion of feed itemsmay be a subset of all feed items to be displayed in an informationfeed. In some implementations, the size of the portion of feed items maybe determined by a user via a direct input provided to a user interface.For example, the user may specify how may feed items are displayed perpage. In some implementations, the database service provider maydetermine the size of the portion of feed items. For example, thedatabase service provider may designate an automatic value that isapplied to any or all information feeds generated using feed paginationmethod 1900.

In various implementations, the first result object includes a feedpagination token. The feed pagination token may be a data structure thatidentifies the last feed item included in the first portion of feeditems. For example, the feed pagination token may identify the last feeditem displayed in a page. By providing an indication of where the firstportion of feed items ends, the feed pagination token may also providean indication of where a second portion of feed items begins. In variousimplementations, the second portion of feed items would begin with thefeed item that succeeds the last feed item of the first portion of feeditems. For example, a news feed may include 19 feed items, such asposts, arranged within the feed from most recent to least recent. Afirst portion of feed items may include feed items 1-10. In thisinstance, the feed pagination token may be a data structure that storesa data value identifying the feed item ID of the 10^(th) feed item.Based on the indication of the last feed item being the 10^(th) feeditem, the data layer may infer that the first feed item of the secondportion of feed items should be the 11^(th) feed item of the feed.

In FIG. 19, at block 1904, the first result object and pagination tokenmay be provided to the feed presentation layer. As similarly discussedwith respect to FIG. 18, blocks 1806 and 1808, the feed items identifiedby the result object may be translated and stored in an intermediarydata structure. In various implementations, the presence of the feedpagination token does not affect or alter translation or storage of thefeed items by the feed presentation layer. Thus, the first portion offeed items may be included in an intermediary data structure that isrendered by a client application and displayed in a display device to auser as previously discussed with reference to information feedpresentation method 1800.

In FIG. 19, at block 1906, a request for a second portion of feed itemsmay be received. In various implementations, the request may be receivedfrom a user via a user interface displayed in a display device of acomputer system. For example, the user may view the first portion offeed items as a first page of the information feed. The display devicemay further display an image including a data field. The data field maydisplay the text “Show more.” The data field may be capable of receivingan input from the user that requests a second portion of feed items. Inresponse to receiving the input from the user, the request may be sentto the feed presentation layer in the form of a message.

In FIG. 19, at block 1908, the pagination token may be provided to thefeed data layer. In various implementations, in response to receivingthe input from the user, the feed presentation layer may forward therequest for a second portion of feed items to the feed data layer. Invarious implementations, the forwarded request may be a message thatincludes the feed pagination token. Accordingly, at block 1908, the feeddata layer may receive the request and the feed pagination token fromthe feed presentation layer.

In FIG. 19, at block 1910, a second result object including the secondportion of feed items may be generated. In various implementations, thedata layer generates the second result object in response to receivingthe feed pagination token. Thus, receipt of the feed pagination tokenmay provide an indication of when the second portion of feed itemsshould be generated. Furthermore, the data layer may read the valuestored in the feed pagination structure to determine where the secondportion of feed items begins. Upon generating the second portion of feeditems, the data layer may overwrite the value stored in the feedpagination token with a value that identifies the last feed itemincluded in the second portion of feed items. The pagination token maybe included in the second result object. In various implementations,feed pagination method 1900 may be repeated until the entire informationfeed has been displayed.

FIG. 20 shows a flowchart of an example of a feed customization method2000, performed in accordance with some implementations. In variousimplementations, feed customization method 2000 may be used to customizethe presentation and operation an information feed. In someimplementations, feed customization method 2000 may change or customizeresults generated by social network feed method 1500. In variousimplementations, the presentation and functionality of feed itemsincluded in the results may be customized to create new feed item types,such as a user poll capable of receiving and displaying votes fromseveral users of a database system.

In various implementations, providing such an interface allows a clientapplication or user to create new feed item types without having tocreate an entirely new type of database query. Because multiple clientapplications may share access to the new feed item type, the amount ofcode used to implement a new feed item type may be reduced. Thus,according to some implementations, feed customization method 2000 mayreceive a result object, receive at least one custom object, and includethe at least one custom object with the first result object to define anintermediary data structure.

In FIG. 20, at block 2002, a result object may be received. As discussedwith reference to FIG. 1500, block 1508, a result object may be a datastructure including a result of a feed query, the result of the feedquery including at least one feed item to be included in an informationfeed. In various implementations, the at least one feed item may have afirst presentation. In some implementations, the first presentation mayrefer to a first graphical configuration of the information included inthe feed item. The graphical configuration of the feed item may indicatehow information included in the feed item, such as text, images, or thebody of a post, is organized and displayed after being rendered byclient application. For example, the presentation of a feed item mayinclude information that identifies how text, images, and the body of apost are oriented and organized with respect to each other.

In FIG. 20, at block 2004, at least one custom object associated withthe at least one feed item may be received. In various implementations,a custom object may refer to a data object or structure that includesone or more data values to be included in the feed item. The one or moredata values may identify a visual representation or functionality to beincluded with a portion of the feed item. For example, a custom objectmay refer to a string of text, an image, or a data field capable ofreceiving an input. According to various implementations, the at leastone custom object provides a second presentation of the at least onefeed item. In various implementations, the second presentation may referto the appearance of a feed item that includes the additional visualrepresentation and/or functionality identified by the custom object.

In FIG. 20, at block 2006, the at least one custom object may beincluded with the result object to define an intermediary datastructure. As similarly discussed with reference to FIG. 18, block 1808,the intermediary data structure may be a data structure that stores atranslated result object including the raw data from the result object,formatting information, and contextual information. In variousimplementations, feed customization method 2000 may provide a user orclient application with an access point through which the user or clientapplication may change or modify the translation process applied to theresult object. In some implementations, the custom object may change ormodify a translation process applied to the result object so that thefeed items included in the intermediary data structure include theadditional visual representation or functionality identified by thecustom object prior to being rendered by the client application.

In FIG. 20, at block 2008, the intermediary data structure may be storedon one or more storage mediums. As similarly discussed with reference toFIG. 1500, block 1510, the one or more storage mediums may be includedin a multitenant database accessible to a plurality of entities in anon-demand computing services environment. Thus, in response to includingthe at least one custom object with the result object to define anintermediary data structure, the database service provider may store theintermediary data structure in a location accessible by multipleentities, such as client applications, that may render the intermediarydata structure into an information feed displayed on a display device.

FIG. 21 shows a flowchart of another example of a feed customizationmethod 2100, performed in accordance with some implementations. Invarious implementations, feed customization method 2100 changes ormodifies the contents of a feed item to include a new or differentpresentation or functionality with the feed item. In variousimplementations, a feed item may be customized, or changed, in responseto an input provided by a user.

In FIG. 21, at block 2102, a result object may be received. According tovarious implementations, the result object may be received from acomputer application, such as a feed data layer, implementinginformation feed generation method 1600. As discussed with reference toFIG. 15, block 1506, a result object may be a data structure including aresult, such as one or more feed items, returned by the feed query.Thus, the result object may include several feed item IDs and additionalfeed data objects to be included in an information feed.

In FIG. 21, at block 2104, custom posts associated with feed itemsincluded in the result object may be received. In variousimplementations, custom posts may refer to one or more data values orevents created by a user of a database service that customize datafields and/or data values that may be stored in a feed item. Thus, theuser may issue a custom post in order to introduce or add afunctionality or appearance to one or more data fields of the feed item.An example of such functionality may be a poll. In variousimplementations, a poll may refer to a presentation of a user-generatedinterrogatory as well as several options or choices responsive to theinterrogatory. Other users of the database service may select one ormore options in order to vote on a response to the interrogatory. Theresults of the vote, or poll, may be displayed. In this instance, acustom post may be used to introduce a poll into a data field of a feeditem. In various implementations, a custom post associated with a feeditem may refer to a custom post made while the user is directlyinteracting with the feed item.

In FIG. 21, at block 2106, the received custom posts may be includedwith the result object to define an intermediary data structure. Assimilarly discussed with reference to FIG. 20, block 2006, the customposts may be incorporated during the translation process applied to theresult object such that one or more feed items included in theintermediary data structure are modified to include the additionalvisual representation or functionality identified by the custom posts.

In various implementations, a feed item handler interface may be used toinclude the received custom posts with the feed items. The feed itemhandler interface may be an instantiation of a class of data objectsthat handles combining custom posts with feed items during translationof the feed item into an intermediary data structure. For example, thefeed item handler interface may receive the custom posts and include thecustom posts in portions of a feed item, such as a body or an auxiliarybody of a post. The modified feed items may then be translated andstored in the intermediary data structure.

Returning to a previous example, a first user may issue a request tocreate a poll. As previously discussed, a poll may be a presentation ofa user generated interrogatory as well as several options or choicesresponsive to the interrogatory. In this instance, the first user may beinteracting with a feed item, such as a second user's post on the seconduser's profile indicating that the second user has a new lead on a salesopportunity. The first user may issue a request to create a poll thatmay appear in the feed item in order to poll other users to determinewhether or not the sales opportunity should be pursued. In response toreceiving the request, the feed item handler interface may query theuser for relevant information, such as any text strings to be includedin the poll. For example, the poll may include the options of “Yes” and“No”. The feed item handler interface may then configure the body of afeed item to include text fields displaying the interrogatory andchoices for the poll. The feed item handler interface may furtherconfigure the body of the feed item to receive an input that identifiesa user's selection of a choice or option.

In FIG. 21, at block 2108, additional feed items may be identified basedon the received custom posts. In various implementations, including thecustom posts in the intermediary data structure may cause triggers torun. In some implementations, triggers may be automated search routinesexecuted in response to a particular event, such as the insertion of apost in a feed item. In various implementations, the database serviceprovider executes the automated search routines. The triggers may searchthe custom posts for mentions or calls to other feed items. In someimplementations, the mentions or calls may be a mention or link toanother user or record, such as a text string that includes a user'susername, a #hashtag, or an @mention.

In one example, a first user may insert a custom post, such as a poll,within a feed item created by the first user. The custom post mayinclude a string of text which mentions a second user. In this instance,the first user may have created a poll asking where a business meetingshould be held. The poll may present several strings of text identifyingoptions that may be voted on. One of the strings of text may be “MadisonRigsby's office.” Thus, the text makes mention of a second user,“Madison Rigsby.” The insertion of the custom post may cause triggers torun. The triggers may search the text of the post and identify themention of “Madison Rigsby.” Additional feed items or additional feeddata objects associated with Madison Rigsby, such as a photographicimage, may be identified and retrieved in response to identifying amention of Madison Rigsby in the custom post.

In FIG. 21, at block 2110, the additional feed items may be included inthe intermediary data structure. As similarly discussed with referenceto FIG. 20, block 2006, the intermediary data structure may be a datastructure storing translated feed items that may be rendered by one ormore client applications. Thus, according to various implementations,identified formatting and contextual information for the additional feeditems may be retrieved. The additional feed items may be translated intoa mid-level language based on the formatting and contextual information.The translated additional feed items may then be included in theintermediary data structure.

In FIG. 21, at block 2112, custom events associated with the feed itemsincluded in the intermediary data structure may be identified. Invarious implementations, a custom event may be a machine or systemgenerated notification. In various implementations the notification maybe a message, such as a string of text, generated by a database serviceprovider. In some implementations, the custom event may be a pointer,such as a foreign key. Thus, the custom event may insert a pointer thatpoints to one or more data values, such as a string of text, stored in aserver of a database system.

According to various implementations, a custom event is generated inresponse to the occurrence of a first event, such as a workflowapproval. In various implementations, a workflow may refer to anautomated process established by a user of the database serviceForce.com® provided by salesforce.com®. An automated process may referto a process in which the user has defined the steps that occur withinthe process, but execution of the process has been automated by thedatabase service provider. For example, a user may automate processessuch emailing alerts, updating data fields, or scripting inbound andoutbound calls. In various implementations, an automated process mayinclude several steps. At least one of the steps may ask for theapproval of a user before proceeding to the next step. If the userapproves, a workflow approval message may be generated that indicatesthat the workflow was approved. In response to the generation of theworkflow approval message, a computing device operated by the databaseservice provider may generate a custom event. In this instance, thecustom event may be a feed item including a message, such as a string oftext, indicating that the workflow has been approved.

In another example, a custom event may be generated in response to atracked change and combined with a feed item identifying the trackedchange. In various implementations, a tracked change may be a change ina data field associated with a tracked data object. For example, a casemay have an associated data record. The data record may include a datafield that identifies the owner of the case. In this instance, the casemay be initially assigned to a first user. However, the case may bereassigned to a second user. Thus, the data value identifying the ownerof the case may change. In various implementations this change istracked by the database system. Thus, a feed item may be generated thatindicates that ownership of the record has changed. Thus, the change inownership may trigger a custom event. In this instance, the custom eventmay be the generation of a text message that provides a full textdescription of the change. For example, the text message may be asentence that identifies the first user, the second user, and a timestamp for the change. In various implementations, a feed item handlerinterface may insert the text message into the body of the feed item.

In FIG. 21, at block 2114, the identified custom events may be includedin the intermediary data structure. As similarly discussed withreference to FIG. 21, block 2110, formatting and contextual informationfor the custom events may be identified and retrieved. The custom eventsmay be translated into a mid-level language based on the formatting andcontextual information. The translated custom events may then beincluded in the intermediary data structure. Thus, according to variousimplementations, the intermediary data structure may include custommessages generated by a computer system or machine operated by thedatabase service provider.

In FIG. 21, at block 2116, the intermediary data structure may beprovided to a client application for rendering. Thus, according tovarious implementations, the client application may render theintermediary data structure into a second data structure capable ofbeing used by that particular client application. For example, aweb-based user interface application may render the intermediary datastructure into hypertext transfer language (HTML). Once rendered intoHTML, the rendered intermediary data structure including the customevents may be displayed to a user as a web-page in a display device of acomputing system.

FIG. 22 shows a flowchart of an example of a create new feed item typemethod 2200, performed in accordance with some implementations. Invarious implementations, create new feed item type method 2200 maygenerate a new feed item type by creating a feed item handler interfacethat handles the querying of data for the new data type, and includesthe queried data in a feed item. In various implementations a new feeditem type may refer to a feed item that includes a new or differentappearance and/or functionality and is generated in response to a newset of tracked events.

In FIG. 22, at block 2202, an indication of a new feed item type to becreated may be received. In various implementations, the indication of anew feed item type may be received from a client application by thedatabase service provider. The indication may be provided to the clientapplication by a user of an on-demand service. In variousimplementations, the user may provide the indication of a new feed itemtype in order to track a specific type of event. For example, the usermay want to track workflow approvals.

In FIG. 22, at block 2204, a schema associated with the new feed itemtype may be defined. In various implementations, a schema may refer to atemplate or structure which may define the representation of a feed itemand information included within the feed item within a database system.Thus, defining the schema determines how feed items and informationincluded in feed items may be stored. For example, a schema may bedefined for a new feed item type such as a poll. The schema may definehow choices for the poll and results for the poll will be representedand stored within data tables included in the database system. In someimplementations, the database service provider may automatically definea schema for a new feed item type as a default setting of an automatedprocess. In various implementations the automatically defined schema maybe modified or customized by the user. In various implementations, thenew schema may be defined entirely by the client application or a userof a database service.

In FIG. 22, at block 2206, the new feed item type may be registered witha class of data objects. As similarly discussed with reference to FIG.17, block 1704, the class of data objects may be a java class offunctions that handles queries for different feed item types. In variousimplementations, the database service provider may define a newenumeration value that identifies the new feed item type. Registeringthe new feed item type with the class of data objects makes the new feeditem type accessible to and usable by any client application that mayrequest an information feed.

In FIG. 22, at block 2208, a feed item handler interface may begenerated based on the new feed item type. As discussed with referenceto FIG. 21, block 2106, the feed item handler interface may handlequeries for a new feed item type. Thus, each time a new feed item typeis called, the feed item handler interface may handle the database queryand incorporate the queried data in a feed item. In variousimplementations, a feed item handler interface may be instantiated foreach new feed item type and handle queries for that type. In someimplementations, a single instance of a feed item handler interface mayhandle queries for multiple new feed item types.

FIG. 23 displays a system representation of a database system 2300 thatmay be used to generate and present an information feed. In variousimplementations database system 2300 is part of a multi-tenant databaseaccessible to a plurality of entities in an on-demand computing servicesenvironment. Thus, database system may 2300 include database 2302, feeddata layer 2304, feed data extensions 2306, feed presentation layer2310, feed presentation extensions 2312, email client application 2316,web user interface layer 2320, web page client application 2322,Chatter® connect interface 2324, and VisualForce® client application2326.

In various implementations, database 2302 may be used to store feeditems. The feed items may be stored in one or more data tables withindatabase 2302. Thus, database 2302 may be a sequential data structurethat may be queried to generate information feeds. In variousimplementations, database 2302 is part of a multi-tenant databaseaccessible to a plurality of entities in an on-demand computing servicesenvironment. Thus, database 2302 may store feed items for a plurality ofusers, records, and entities that may be associated with database 2302.

Feed data layer 2304 may be a layer implemented within a computerapplication that performs the method of information feed generationmethod 1600. Thus, according to various implementations, feed data layer2304 may query the database to identify feed items to include in aninformation feed. Furthermore, feed data layer 2304 may also include adata loader that retrieves additional information, such as additionalfeed data objects. Feed data layer 2304 may package the results of thequery and retrieval into a result object. As discussed with reference toFIG. 16, feed data layer 2304 may implement pagination method 1900.

Feed data extensions 2306 may refer to a portion of database system 2300that stores the classes of data objects used by the feed data layer. Invarious implementations the portion of database system 2300 may refer toone or more storage servers used to store the classes of data objects.Instantiations of the classes of data objects included in feed dataextensions 2306 may allow a user or client application to create a newfeed type, as described with reference to create new feed type method2100.

Feed presentation layer 2310 may be a layer implemented within acomputer application that performs the method of information feedpresentation method 1800. Thus, according to various implementations,feed presentation layer may receive the result object from feed datalayer 2304 and may identify and retrieve formatting and contextualinformation for each feed item included in the result object. Feed datalayer 2304 may include the retrieved data with the result object togenerate an intermediary data structure.

Feed presentation extensions 2312 may refer to a portion of databasesystem 2300 that stores the classes of data objects used to implementinterfaces used by feed presentation layer 2310. In variousimplementations the portion of database system 2300 may refer to one ormore storage servers used to store the classes of data objects.Instantiations of the classes of data objects included in feedpresentation extensions 2312 may allow a user of client to create a newfeed item type, as described with reference to create new feed item typemethod 1700.

Email client application 2316 may be a client application that selectsspecific feed items to render into emails in batches. In variousimplementations, email client application 2316 may create its own feedtype. For example, email client application 2316 may access a class ofdata objects stored in feed data extensions 2306 to implement its ownfeed search strategy to define a new feed type. The new feed type mayinclude an instance of feed parameters and feed search strategy. Feeddata layer 2304 may perform the feed search and generate a resultobject. The result object may be passed to feed presentation layer 2310which may translate the result object into an intermediate datastructure. Email client application 2316 may receive the intermediatedata structure from feed presentation layer 2310 and render theintermediate data structure into HTML for display by an email client.

Web user interface layer 2320 renders an intermediary data structureprovided by feed presentation layer 2310 into HTML. Web user interfacelayer 2320 may wrap appropriate strings in Elements, and add URLs tophotos, users, and records where appropriate. In variousimplementations, the URLs are provided by feed presentation layer 2310.In some implementations, the HTML output generated by web user interfacelayer 2320 is provided to other client applications. For example, invarious implementations, the HTML output may be provided to web pageclient application 2322. In some implementations, web page clientapplication 2322 may simply display the HTML output to a user as awebpage in a display device of a computer system.

In another example, the HTML output may be provided to Chatter® connectuser interface 2324. In various implementations, Chatter® connect userinterface 2324 may provide an application program interface to Chatter®that serializes operation of feed presentation layer 2310 to provideexternal clients a RESTful interface to presentation layer 2310. Thus,external web applications connecting to the database service Chatter®provided by salesforce.com® may request information feeds and bepresented with information feeds via Chatter® connect user interface2324.

In yet another example, the HTML output file may be provided toVisualForce® client application 2326. In various implementationsVisualForce® client application 2326 may be an application that providesthe database service VisualForce® to one or more users of a databasesystem. In various implementations the HTML output file may be providedto VisualForce® client application 2326 for modification by a user.Thus, according to various implementations, a user of the databaseservice VisualForce® may request information feeds generated by feeddata layer 2304 and feed presentation layer 2310. The user may bepresented with a rendered HTML file that may be modified via featuresprovided by VisualForce®.

The specific details of the specific aspects of implementationsdisclosed herein may be combined in any suitable manner withoutdeparting from the spirit and scope of the disclosed implementations.However, other implementations may be directed to specificimplementations relating to each individual aspect, or specificcombinations of these individual aspects.

While the disclosed examples are often described herein with referenceto an implementation in which an on-demand enterprise servicesenvironment is implemented in a system having an application serverproviding a front end for an on-demand database service capable ofsupporting multiple tenants, the present invention is not limited tomulti-tenant databases nor deployment on application servers.Implementations may be practiced using other database architectures,i.e., ORACLE®, DB2® by IBM and the like without departing from the scopeof the implementations claimed.

It should be understood that some of the disclosed implementations canbe embodied in the form of control logic using hardware and/or usingcomputer software in a modular or integrated manner. Other ways and/ormethods are possible using hardware and a combination of hardware andsoftware.

Any of the software components or functions described in thisapplication may be implemented as software code to be executed by aprocessor using any suitable computer language such as, for example,Java, C++ or Perl using, for example, conventional or object-orientedtechniques. The software code may be stored as a series of instructionsor commands on a computer readable medium for storage and/ortransmission, suitable media include random access memory (RAM), a readonly memory (ROM), a magnetic medium such as a hard-drive or a floppydisk, or an optical medium such as a compact disk (CD) or DVD (digitalversatile disk), flash memory, and the like. The computer readablemedium may be any combination of such storage or transmission devices.Computer readable media encoded with the software/program code may bepackaged with a compatible device or provided separately from otherdevices (e.g., via Internet download). Any such computer readable mediummay reside on or within a single computer program product (e.g., a harddrive or an entire computer system), and may be present on or withindifferent computer program products within a system or network. Acomputer system, or other computing device, may include a monitor,printer, or other suitable display for providing any of the resultsmentioned herein to a user.

While various implementations have been described herein, it should beunderstood that they have been presented by way of example only, and notlimitation. Thus, the breadth and scope of the present applicationshould not be limited by any of the implementations described herein,but should be defined only in accordance with the following andlater-submitted claims and their equivalents.

What is claimed is:
 1. A computer implemented method comprising:receiving, by one or more computing devices associated with a data basesystem implementing a social networking system, a request to generate aninformation feed of the social networking system; performing, by the oneor more computing devices, a feed query to identify feed items stored inthe database system; receiving, by the one or more computing devices, afirst result object indicating a result of the feed query, the firstresult object including at least one feed item identifier (ID)identifying at least one feed item associated with the social networkingsystem, the at least one feed item having a first graphicalconfiguration providing a first presentation; retrieving separately fromthe feed query, by the one or more computing devices, at least onecustom object associated with the at least one feed item, the at leastone custom object including contextual information indicating how toconvert the feed item ID into a description of the feed item andformatting information indicating how text, images and a body of thefeed item are oriented and organized with respect to each other into asecond graphical configuration providing a second presentation for theat least one feed item; generating, by the one or more computingdevices, an intermediary data structure including the at least onecustom object and the first result object; and providing, by the one ormore computing devices, the intermediary data structure to anapplication for rendering the at least one feed item into the secondpresentation based on the contextual information and formattinginformation in the custom object.
 2. The computer implemented method ofclaim 1, wherein the first graphical configuration provides a first typeof rendering for text, images, and a body of a post in the at least onefeed item and the contextual information and formatting informationprovides a second different type of rendering for the text, images, andbody of the post in the at least one feed item.
 3. The computerimplemented method of claim 1, wherein the intermediary data structureis provided to multiple different client applications for inclusion inmultiple different information feeds.
 4. The computer implemented methodof claim 1, wherein the first presentation is a default presentation. 5.The computer implemented method of claim 1, wherein the intermediarydata structure is generated prior to a display of the first presentationof the at least one feed item.
 6. The computer implemented method ofclaim 1, wherein the at least one custom object includes at least onecustom post being a data object created in response to a direct inputfrom a user of a database system.
 7. The computer implemented method ofclaim 6 further comprising: identifying a plurality of feed items basedon information included in the at least one custom post; and includingthe plurality of feed items with the intermediary data structure.
 8. Thecomputer implemented method of claim 7, wherein information included inthe custom post includes one or more items selected from the groupconsisting of: an @mention, a #hashtag, and a poll.
 9. The computerimplemented method of claim 1, wherein the at least one custom objectcomprises at least one custom event, the at least one custom event beinga data object created in response to an action taken by a databaseservice provider in an on-demand service environment.
 10. The computerimplemented method of claim 9, wherein the at least one custom eventincludes one or more items selected from the group consisting of: atracked change, a post, and a workflow approval.
 11. The computerimplemented method of claim 1 further comprising: defining a schemaassociated with the at least one feed item, the schema indicating alayout of the at least one feed item.
 12. The computer implementedmethod of claim 11, wherein the schema is defined using a foreign key.13. The computer implemented method of claim 1 further comprising:creating at least one custom feed item based on the custom object andthe at least one feed item; and registering the at least one custom feeditem as an enumerated value.
 14. The computer implemented method ofclaim 13, wherein the enumerated value indicates a new feed item type.15. The computer implemented method of claim 1, wherein generating theintermediary data structure includes providing the at least one customobject in the information feed.
 16. The computer implemented method ofclaim 1, wherein the at least one feed item includes a message.
 17. Thecomputer implemented method of claim 16, wherein the message includesone or more items selected from the group consisting of: a post, acomment, audio data, video data, a status update, an uploaded file, alink to a file, a link to a web page, a link to a record, and anindication of a personal preference.
 18. The computer implemented methodof claim 1, further including storing the intermediary data structure onone or more storage mediums, wherein the stored intermediary datastructure is provided to multiple different client applications forincluding in other information feeds.
 19. A system comprising: adatabase system implementing a social networking system; and one or moreprocessors operable to: receive a request to generate an informationfeed of the social networking system: perform a feed query to identifyfeed items stored in the database system: receive a first result objectindicating a result of the feed query, the first result object includingat least one feed item identifier (ID) identifying at least one feeditem stored in the database system to be included in the informationfeed and the first result object providing no information for displayingthe feed item; retrieve at least one custom object separately from thefeed query associated with the at least one feed item, the at least onecustom object including contextual information indicating how to convertthe feed item ID into a description of the feed item and formattinginformation indicating how text, images and a body of the feed item areoriented and organized with respect to each other; generate anintermediary data structure including the at least one custom object andthe first result object, the intermediary data structure including thecontextual information and formatting information for the at least onefeed item; and provide the intermediary data structure to one or moreapplications for translating into a mid-level language based on thecontextual information and formatting information in the custom object.20. The system of claim 19, wherein the intermediary data structure isconverted into an image displayed on a mobile device for a first mobiledevice application and converted into hypertext markup language (HTML)for a second webpage application.
 21. The system of claim 19, whereinthe mid-level language is a hypertext markup language (HTML).
 22. Thesystem of claim 19, wherein the intermediary data structure is generatedprior to a display of the at least one feed item.
 23. The system ofclaim 19, wherein the at least one custom object includes at least onecustom post being a data object created in response to a direct inputfrom a user of a database system.
 24. The system of claim 23, the one ormore processors further operable to: identify a plurality of feed itemsbased on information included in the at least one custom post; andinclude the plurality of feed items with the intermediary datastructure.
 25. The system of claim 19, wherein the at least one customobject comprises at least one custom event, the at least one customevent being a data object created in response to an action taken by adatabase service provider in an on-demand service environment.
 26. Thesystem of claim 19, the one or more processors further operable to:define a schema associated with the at least one feed item, the schemaindicating a layout of the at least one feed item.
 27. The system ofclaim 19, wherein generating the intermediary data structure includesproviding the at least one custom object in the information feed. 28.The system of claim 19, wherein the at least one feed item includes amessage.
 29. The system of claim 28, wherein the message includes one ormore items selected from the group consisting of: a post, a comment,audio data, video data, a status update, an uploaded file, a link to afile, a link to a web page, a link to a record, and an indication of apersonal preference.
 30. A non-transitory tangible computer-readablestorage medium storing instructions executable by a computing device tocause a method to be performed, the method comprising: receiving arequest to generate an information feed of a social networking systemimplemented in conjunction with a database system; performing a feedquery to identify feed items stored in the database system; receiving afirst result object indicating a result of the feed query, the firstresult object including at least one feed item identifier (ID)identifying at least one feed item stored in the database system to beincluded in the information feed, the at least one feed item having afirst format providing a first presentation; receiving at least onecustom object associated with the at least one feed item, the at leastone custom object including contextual information indicating how toconvert the feed item ID into a description of the feed item andformatting information indicating how text, images and a body of thefeed item are oriented and organized with respect to each into a secondformat providing a second presentation for the at least one feed item;generating an intermediary data structure including the at least onecustom object and the first result object; and providing theintermediary data structure to an application for rendering the at leastone feed item into the second presentation based on the contextualinformation and formatting information in the custom object.
 31. Thenon-transitory tangible computer-readable storage medium of claim 30,wherein the first presentation includes a first appearance of the atleast one feed item, and the second presentation includes a secondappearance different from the first appearance.
 32. The non-transitorytangible computer-readable storage medium of claim 30, wherein the firstpresentation includes a first functionality of the at least one feeditem, and the second presentation includes a second functionalitydifferent from the first functionality.
 33. The non-transitory tangiblecomputer-readable storage medium of claim 30, wherein the intermediarydata structure is generated prior to a display of the first presentationof the at least one feed item.
 34. The non-transitory tangiblecomputer-readable storage medium of claim 30, wherein the at least onecustom object includes at least one custom post being a data objectcreated in response to a direct input from a user of a database system.35. The non-transitory tangible computer-readable storage medium ofclaim 30, wherein the at least one custom object comprises at least onecustom event, the at least one custom event being a data object createdin response to an action taken by a database service provider in anon-demand service environment.
 36. The non-transitory tangiblecomputer-readable storage medium of claim 30, wherein the at least onefeed item includes a message.
 37. The non-transitory tangiblecomputer-readable storage medium of claim 36, wherein the messageincludes one or more items selected from the group consisting of: apost, a comment, audio data, video data, a status update, an uploadedfile, a link to a file, a link to a web page, a link to a record, and anindication of a personal preference.
 38. The computer implemented methodof claim 18, wherein the one or more storage mediums are included in amulti-tenant database accessible to a plurality of entities in anon-demand computing services environment.
 39. The system of claim 19,wherein the one or more processors are further operable to store theintermediary data structure on the database system, wherein the storedintermediary data structure is provided to multiple different clientapplications for inclusion in other information feeds.